.show database.show database

返回一个表,其中显示了上下文数据库的属性。Returns a table showing the properties of the context database.

若要返回一个表,其中的每条记录都与该用户有权访问的群集中的某个数据库相对应,请参阅 .show databaseTo return a table in which every record corresponds to a database in the cluster that the user has access to, see .show databases.

语法Syntax

.show database [details | identity | policies | datastats].show database [details | identity | policies | datastats]

未指定任何选项的默认调用等于“identity”选项。The default call without any options specified is equal to 'identity' option.

“identity”选项的输出Output for 'identity' option

输出参数Output parameter 类型Type 说明Description
DatabaseNameDatabaseName StringString 数据库名称。The database name. 数据库名称区分大小写。Database names are case-sensitive.
PersistentStoragePersistentStorage StringString 在其中存储数据库的持久存储 URI。The persistent storage URI in which the database is stored. (对于临时数据库,此字段为空。)(This field is empty for ephemeral databases.)
版本Version StringString 数据库的版本号。Database version number. 此数字针对数据库中的每个更改操作(例如,添加数据和更改架构)进行更新。This number is updated for each change operation in the database (such as adding data and changing the schema).
IsCurrentIsCurrent 布尔Boolean 如果数据库是当前连接所指向的数据库,则为 True。True if the database is the one that the current connection points to.
DatabaseAccessModeDatabaseAccessMode StringString 群集附加到数据库的方式。How the cluster is attached to the database. 例如,如果数据库是在只读模式下附加的,则群集以任何方式修改数据库的所有请求都将失败。For example, if the database is attached in ReadOnly mode then the cluster will fail all requests to modify the database in any way.
PrettyNamePrettyName StringString 数据库友好名称The database pretty name.
CurrentUserIsUnrestrictedViewerCurrentUserIsUnrestrictedViewer 布尔Boolean 指定当前用户是否是数据库的不受限制的查看者。Specifies if the current user is an unrestricted viewer on the database.
数据库 IDDatabaseId GuidGuid 数据库的唯一 ID。The database's unique ID.

“details”选项的输出Output for 'details' option

输出参数Output parameter 类型Type 说明Description
DatabaseNameDatabaseName StringString 数据库名称。The database name. 数据库名称区分大小写。Database names are case-sensitive.
PersistentStoragePersistentStorage StringString 在其中存储数据库的持久存储 URI。The persistent storage URI in which the database is stored. (对于临时数据库,此字段为空。)(This field is empty for ephemeral databases.)
版本Version StringString 数据库版本号。The database version number. 此数字针对数据库中的每个更改操作(例如,添加数据和更改架构)进行更新。This number is updated for each change operation in the database (such as adding data and changing the schema).
IsCurrentIsCurrent 布尔Boolean 如果数据库是当前连接所指向的数据库,则为 True。True if the database is the one that the current connection points to.
DatabaseAccessModeDatabaseAccessMode StringString 群集附加到数据库的方式。How the cluster is attached to the database. 例如,如果数据库是在只读模式下附加的,则群集以任何方式修改数据库的所有请求都将失败。For example, if the database is attached in ReadOnly mode then the cluster will fail all requests to modify the database in any way.
PrettyNamePrettyName StringString 数据库友好名称The database pretty name.
AuthorizedPrincipalsAuthorizedPrincipals StringString 数据库的授权主体集合(以 JSON 格式序列化)。The database's collection of authorized principals (serialized in JSON format).
RetentionPolicyRetentionPolicy StringString 数据库的保留策略(以 JSON 格式序列化)。The database's Retention policy (serialized in JSON format).
MergePolicyMergePolicy StringString 数据库的“盘区合并”策略(以 JSON 格式序列化)。The database's Extents Merge policy (serialized in JSON format).
CachingPolicyCachingPolicy StringString 数据库的“缓存”策略(以 JSON 格式序列化)。The database's Caching policy (serialized in JSON format).
ShardingPolicyShardingPolicy StringString 数据库的“分片”策略(以 JSON 格式序列化)。The database's Sharding policy (serialized in JSON format).
StreamingIngestionPolicyStreamingIngestionPolicy StringString 数据库的“流式引入”策略(以 JSON 格式序列化)。The database's Streaming Ingestion policy (serialized in JSON format).
IngestionBatchingPolicyIngestionBatchingPolicy StringString 数据库的“引入批处理”策略(以 JSON 格式序列化)。The database's Ingestion Batching policy (serialized in JSON format).
TotalSizeTotalSize RealReal 数据库的盘区总大小。The database's extents total size.
数据库 IDDatabaseId GuidGuid 数据库的唯一 ID。The database's unique ID.

“policies”选项的输出Output for 'policies' option

输出参数Output parameter 类型Type 说明Description
DatabaseNameDatabaseName StringString 数据库名称。The database name. 数据库名称区分大小写。Database names are case-sensitive.
PersistentStoragePersistentStorage StringString 在其中存储数据库的持久存储 URI。The persistent storage URI in which the database is stored. (对于临时数据库,此字段为空。)(This field is empty for ephemeral databases.)
版本Version StringString 数据库版本号。The database version number. 此数字针对数据库中的每个更改操作(例如,添加数据和更改架构)进行更新。This number is updated for each change operation in the database (such as adding data and changing the schema).
IsCurrentIsCurrent 布尔Boolean 如果数据库是当前连接所指向的数据库,则为 True。True if the database is the one that the current connection points to.
DatabaseAccessModeDatabaseAccessMode StringString 群集附加到数据库的方式。How the cluster is attached to the database. 例如,如果数据库是在只读模式下附加的,则群集以任何方式修改数据库的所有请求都将失败。For example, if the database is attached in ReadOnly mode then the cluster will fail all requests to modify the database in any way.
PrettyNamePrettyName StringString 数据库的友好名称。The database's pretty name.
数据库 IDDatabaseId GuidGuid 数据库的唯一 ID。The database's unique ID.
AuthorizedPrincipalsAuthorizedPrincipals StringString 数据库的授权主体集合(以 JSON 格式序列化)。The database's collection of authorized principals (serialized in JSON format).
RetentionPolicyRetentionPolicy StringString 数据库的保留策略(以 JSON 格式序列化)。The database's Retention policy (serialized in JSON format).
MergePolicyMergePolicy StringString 数据库的“盘区合并”策略(以 JSON 格式序列化)。The database's Extents Merge policy (serialized in JSON format).
CachingPolicyCachingPolicy StringString 数据库的“缓存”策略(以 JSON 格式序列化)。The database's Caching policy (serialized in JSON format).
ShardingPolicyShardingPolicy StringString 数据库的“分片”策略(以 JSON 格式序列化)。The database's Sharding policy (serialized in JSON format).
StreamingIngestionPolicyStreamingIngestionPolicy StringString 数据库的“流式引入”策略(以 JSON 格式序列化)。The database's Streaming Ingestion policy (serialized in JSON format).
IngestionBatchingPolicyIngestionBatchingPolicy StringString 数据库的“引入批处理”策略(以 JSON 格式序列化)。The database's Ingestion Batching policy (serialized in JSON format).

“datastats”选项的输出Output for 'datastats' option

输出参数Output parameter 类型Type 说明Description
DatabaseNameDatabaseName StringString 数据库名称。The database name. 数据库名称区分大小写。Database names are case-sensitive.
PersistentStoragePersistentStorage StringString 在其中存储数据库的持久存储 URI。The persistent storage URI in which the database is stored. (对于临时数据库,此字段为空。)(This field is empty for ephemeral databases.)
版本Version StringString 数据库版本号。The database version number. 此数字针对数据库中的每个更改操作(例如,添加数据和更改架构)进行更新。This number is updated for each change operation in the database (such as adding data and changing the schema).
IsCurrentIsCurrent 布尔Boolean 如果数据库是当前连接所指向的数据库,则为 True。True if the database is the one that the current connection points to.
DatabaseAccessModeDatabaseAccessMode StringString 群集附加到数据库的方式。How the cluster is attached to the database. 例如,如果数据库是在只读模式下附加的,则群集以任何方式修改数据库的所有请求都将失败。For example, if the database is attached in ReadOnly mode then the cluster will fail all requests to modify the database in any way.
PrettyNamePrettyName StringString 数据库的友好名称。The database's pretty name.
数据库 IDDatabaseId GuidGuid 数据库的唯一 ID。The database's unique ID.
OriginalSizeOriginalSize RealReal 数据库的盘区总原始大小。The database's extents total original size.
ExtentSizeExtentSize RealReal 数据库的盘区总大小(数据 + 索引)。The database's extents total size (data + indices).
CompressedSizeCompressedSize RealReal 数据库的盘区总数据压缩大小。The database's extents total data compressed size.
IndexSizeIndexSize RealReal 数据库的盘区总索引大小。The database's extents total index size.
RowCountRowCount LongLong 数据库的盘区总行计数。The database's extents total row count.
HotOriginalSizeHotOriginalSize RealReal 数据库的热盘区总原始大小。The database's hot extents total original size.
HotExtentSizeHotExtentSize RealReal 数据库的热盘区总大小(数据 + 索引)。The database's hot extents total size (data + indices).
HotCompressedSizeHotCompressedSize RealReal 数据库的热盘区总数据压缩大小。The database's hot extents total data compressed size.
HotIndexSizeHotIndexSize RealReal 数据库的热盘区总索引大小。The database's hot extents total index size.
HotRowCountHotRowCount LongLong 数据库的热盘区总行计数。The database's hot extents total row count.