sys.databases (Transact-SQL)sys.databases (Transact-SQL)
適用対象:Applies to: SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL データベースAzure SQL Database
Azure SQL データベースAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL データベースAzure SQL Database
Azure SQL データベースAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
SQL ServerSQL Serverのインスタンスに、データベースごとに 1 行のデータを保持します。Contains one row per database in the instance of SQL ServerSQL Server.
データベースがでない場合 ONLINE
、また AUTO_CLOSE
はに設定され ON
ていて、データベースが閉じている場合は、一部の列の値がになることがあり NULL
ます。If a database is not ONLINE
, or AUTO_CLOSE
is set to ON
and the database is closed, the values of some columns may be NULL
. データベースがの場合 OFFLINE
、対応する行は低い特権のユーザーには表示されません。If a database is OFFLINE
, the corresponding row is not visible to low-privileged users. データベースがである場合に対応する行を表示するには、少なくとも OFFLINE
ALTER ANY DATABASE
サーバーレベルの権限、または CREATE DATABASE
データベース内の権限を持っている必要があり master
ます。To see the corresponding row if the database is OFFLINE
, a user must have at least the ALTER ANY DATABASE
server-level permission, or the CREATE DATABASE
permission in the master
database.
列名Column name | データ型Data type | 説明Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
namename | sysnamesysname | のインスタンス内 SQL ServerSQL Server またはサーバー内で一意のデータベースの名前 Azure SQL データベースAzure SQL Database 。Name of database, unique within an instance of SQL ServerSQL Server or within a Azure SQL データベースAzure SQL Database server. | ||||||||||||||||||||
database_iddatabase_id | intint | SQL ServerSQL Server のインスタンス内、または Azure SQL データベースAzure SQL Database サーバー内で一意な、データベースの識別子。ID of the database, unique within an instance of SQL ServerSQL Server or within a Azure SQL データベースAzure SQL Database server. | ||||||||||||||||||||
source_database_idsource_database_id | intint | NULL 以外 = このデータベース スナップショットのソース データベースの ID です。Non-NULL = ID of the source database of this database snapshot. NULL = データベース スナップショットではありません。NULL = Not a database snapshot. |
||||||||||||||||||||
owner_sidowner_sid | varbinary(85)varbinary(85) | サーバーに登録したデータベースの外部所有者の SID (セキュリティ識別子) です。SID (Security-Identifier) of the external owner of the database, as registered to the server. データベースを所有できるユーザーの詳細については、「alter authorization」の「 alter authorization for databases 」セクションを参照してください。For information about who can own a database, see the ALTER AUTHORIZATION for databases section of ALTER AUTHORIZATION. | ||||||||||||||||||||
create_datecreate_date | datetimedatetime | データベースの作成または名前の変更を行った日付です。Date the database was created or renamed. Tempdb の場合は、サーバーが再起動されるたびにこの値が変更されます。For tempdb, this value changes every time the server restarts. | ||||||||||||||||||||
compatibility_levelcompatibility_level | tinyinttinyint | 動作に互換性のある SQL ServerSQL Server のバージョンに対応する整数です。Integer corresponding to the version of SQL ServerSQL Server for which behavior is compatible:
|
||||||||||||||||||||
collation_namecollation_name | sysnamesysname | データベースの照合順序です。Collation for the database. データベースの既定の照合順序として機能します。Acts as the default collation in the database. NULL = データベースがオンラインでないか、AUTO_CLOSE が ON に設定されていて、データベースが閉じています。NULL = Database is not online or AUTO_CLOSE is set to ON and the database is closed. |
||||||||||||||||||||
user_accessuser_access | tinyinttinyint | ユーザー アクセス設定です。User-access setting: 0 = MULTI_USER が指定されています。0 = MULTI_USER specified 1 = SINGLE_USER が指定されています。1 = SINGLE_USER specified 2 = RESTRICTED_USER が指定されています。2 = RESTRICTED_USER specified |
||||||||||||||||||||
user_access_descuser_access_desc | nvarchar(60)nvarchar(60) | ユーザー アクセス設定の説明です。Description of user-access setting. | ||||||||||||||||||||
is_read_onlyis_read_only | bitbit | 1 = データベースは READ_ONLY です。1 = Database is READ_ONLY 0 = データベースは READ_WRITE です。0 = Database is READ_WRITE |
||||||||||||||||||||
is_auto_close_onis_auto_close_on | bitbit | 1 = AUTO_CLOSE は ON です。1 = AUTO_CLOSE is ON 0 = AUTO_CLOSE は OFF です。0 = AUTO_CLOSE is OFF |
||||||||||||||||||||
is_auto_shrink_onis_auto_shrink_on | bitbit | 1 = AUTO_SHRINK は ON です。1 = AUTO_SHRINK is ON 0 = AUTO_SHRINK は OFF です。0 = AUTO_SHRINK is OFF |
||||||||||||||||||||
状態state | tinyinttinyint | ValueValue 0 = ONLINE0 = ONLINE 1 = 復元中1 = RESTORING 2 = 回復 12 = RECOVERING 1 3 = RECOVERY_PENDING 13 = RECOVERY_PENDING 1 4 = 問題あり4 = SUSPECT 5 = 緊急 15 = EMERGENCY 1 6 = オフライン 16 = OFFLINE 1 7 = コピー 27 = COPYING 2 10 = OFFLINE_SECONDARY 210 = OFFLINE_SECONDARY 2 注: Always On データベースの場合は、 database_state sys.dm_hadr_database_replica_states の列または列に対してクエリを実行 database_state_desc します。 Note: For Always On databases, query the database_state or database_state_desc columns of sys.dm_hadr_database_replica_states.1 に適用さ れます: SQL ServerSQL Server (以降 SQL Server 2008SQL Server 2008 ) および Azure SQL データベースAzure SQL Database1 Applies to: SQL ServerSQL Server (starting with SQL Server 2008SQL Server 2008) and Azure SQL データベースAzure SQL Database 2 に適用さ れます。 Azure SQL データベースAzure SQL Databaseアクティブな地理的レプリケーションActive Geo-Replication2 Applies to: Azure SQL データベースAzure SQL Database アクティブな地理的レプリケーションActive Geo-Replication |
||||||||||||||||||||
state_descstate_desc | nvarchar(60)nvarchar(60) | データベースの状態の説明。Description of the database state. 「状態」を参照してください。See state. | ||||||||||||||||||||
is_in_standbyis_in_standby | bitbit | データベースは、復元ログに対し、読み取り専用です。Database is read-only for restore log. | ||||||||||||||||||||
is_cleanly_shutdownis_cleanly_shutdown | bitbit | 1 = データベースはクリーンにシャットダウンされ、起動時に復旧処理は必要ありません。1 = Database shut down cleanly; no recovery required on startup 0 = データベースはクリーンにシャットダウンされなかったため、起動時に復旧処理が必要です。0 = Database did not shut down cleanly; recovery is required on startup |
||||||||||||||||||||
is_supplemental_logging_enabledis_supplemental_logging_enabled | bitbit | 1 = SUPPLEMENTAL_LOGGING は ON です。1 = SUPPLEMENTAL_LOGGING is ON 0 = SUPPLEMENTAL_LOGGING は OFF です。0 = SUPPLEMENTAL_LOGGING is OFF |
||||||||||||||||||||
snapshot_isolation_statesnapshot_isolation_state | tinyinttinyint | ALLOW_SNAPSHOT_ISOLATION オプションによって設定された、許可されているスナップショット分離トランザクションの状態。State of snapshot-isolation transactions being allowed, as set by the ALLOW_SNAPSHOT_ISOLATION option: 0 = スナップショット分離の状態は OFF です (既定)。0 = Snapshot isolation state is OFF (default). スナップショット分離は許可されていません。Snapshot isolation is disallowed. 1 = スナップショット分離の状態は ON です。1 = Snapshot isolation state ON. スナップショット分離は許可されています。Snapshot isolation is allowed. 2 = スナップショット分離状態はオフ状態に遷移中です。2 = Snapshot isolation state is in transition to OFF state. すべてのトランザクションで、その変更がバージョン管理されます。All transactions have their modifications versioned. スナップショット分離を使用して新しいトランザクションを開始することはできません。Cannot start new transactions using snapshot isolation. ALTER DATABASE が実行されたときにアクティブだったすべてのトランザクションが完了するまで、データベースは OFF に移行中の状態となります。The database remains in the transition to OFF state until all transactions that were active when ALTER DATABASE was run can be completed. 3 = スナップショット分離の状態はオン状態に遷移中です。3 = Snapshot isolation state is in transition to ON state. 新しいトランザクションでは、変更がバージョン管理されます。New transactions have their modifications versioned. スナップショット分離の状態が 1 (ON) になるまで、トランザクションでスナップショット分離を使用することはできません。Transactions cannot use snapshot isolation until the snapshot isolation state becomes 1 (ON). ALTER DATABASE が実行されたときにアクティブだったすべての更新トランザクションが完了するまで、データベースは状態に遷移したままになります。The database remains in the transition to ON state until all update transactions that were active when ALTER DATABASE was run can be completed. |
||||||||||||||||||||
snapshot_isolation_state_descsnapshot_isolation_state_desc | nvarchar(60)nvarchar(60) | ALLOW_SNAPSHOT_ISOLATION オプションによって設定された、許可されているスナップショット分離トランザクションの状態の説明。Description of state of snapshot-isolation transactions being allowed, as set by the ALLOW_SNAPSHOT_ISOLATION option. | ||||||||||||||||||||
is_read_committed_snapshot_onis_read_committed_snapshot_on | bitbit | 1 = READ_COMMITTED_SNAPSHOT オプションは ON です。1 = READ_COMMITTED_SNAPSHOT option is ON. READ COMMITTED 分離レベルでの読み取り操作は、スナップショット スキャンに基づいており、ロックを取得しません。Read operations under the read-committed isolation level are based on snapshot scans and do not acquire locks. 0 = READ_COMMITTED_SNAPSHOT オプションは OFF です (既定)。0 = READ_COMMITTED_SNAPSHOT option is OFF (default). Read committed 分離レベルでの読み取り操作では、共有ロックが使用されます。Read operations under the read-committed isolation level use share locks. |
||||||||||||||||||||
recovery_modelrecovery_model | tinyinttinyint | 選択される復旧モデルです。Recovery model selected: 1 = FULL1 = FULL 2 = BULK_LOGGED2 = BULK_LOGGED 3 = SIMPLE3 = SIMPLE |
||||||||||||||||||||
recovery_model_descrecovery_model_desc | nvarchar(60)nvarchar(60) | 選択された復旧モデルの説明です。Description of recovery model selected. | ||||||||||||||||||||
page_verify_optionpage_verify_option | tinyinttinyint | PAGE_VERIFY オプションの設定です。Setting of PAGE_VERIFY option: 0 = NONE0 = NONE 1 = TORN_PAGE_DETECTION1 = TORN_PAGE_DETECTION 2 = CHECKSUM2 = CHECKSUM |
||||||||||||||||||||
page_verify_option_descpage_verify_option_desc | nvarchar(60)nvarchar(60) | PAGE_VERIFY オプション設定の説明です。Description of PAGE_VERIFY option setting. | ||||||||||||||||||||
is_auto_create_stats_onis_auto_create_stats_on | bitbit | 1 = AUTO_CREATE_STATISTICS は ON です。1 = AUTO_CREATE_STATISTICS is ON 0 = AUTO_CREATE_STATISTICS は OFF です。0 = AUTO_CREATE_STATISTICS is OFF |
||||||||||||||||||||
is_auto_create_stats_incremental_onis_auto_create_stats_incremental_on | bitbit | 自動統計の増分オプションの既定の設定を示します。Indicates the default setting for the incremental option of auto stats. 0 = 自動作成の統計は非増分です。0 = auto create stats are non-incremental 1 = 可能な場合は、自動作成の統計情報は増分されます。1 = auto create stats are incremental if possible 適用対象: SQL ServerSQL Server (SQL Server 2014 (12.x)SQL Server 2014 (12.x) 以降)。Applies to: SQL ServerSQL Server (starting with SQL Server 2014 (12.x)SQL Server 2014 (12.x)). |
||||||||||||||||||||
is_auto_update_stats_onis_auto_update_stats_on | bitbit | 1 = AUTO_UPDATE_STATISTICS は ON です。1 = AUTO_UPDATE_STATISTICS is ON 0 = AUTO_UPDATE_STATISTICS は OFF です。0 = AUTO_UPDATE_STATISTICS is OFF |
||||||||||||||||||||
is_auto_update_stats_async_onis_auto_update_stats_async_on | bitbit | 1 = AUTO_UPDATE_STATISTICS_ASYNC は ON です。1 = AUTO_UPDATE_STATISTICS_ASYNC is ON 0 = AUTO_UPDATE_STATISTICS_ASYNC は OFF です。0 = AUTO_UPDATE_STATISTICS_ASYNC is OFF |
||||||||||||||||||||
is_ansi_null_default_onis_ansi_null_default_on | bitbit | 1 = ANSI_NULL_DEFAULT は ON です。1 = ANSI_NULL_DEFAULT is ON 0 = ANSI_NULL_DEFAULT は OFF です。0 = ANSI_NULL_DEFAULT is OFF |
||||||||||||||||||||
is_ansi_nulls_onis_ansi_nulls_on | bitbit | 1 = ANSI_NULLS は ON です。1 = ANSI_NULLS is ON 0 = ANSI_NULLS は OFF です。0 = ANSI_NULLS is OFF |
||||||||||||||||||||
is_ansi_padding_onis_ansi_padding_on | bitbit | 1 = ANSI_PADDING は ON です。1 = ANSI_PADDING is ON 0 = ANSI_PADDING は OFF です。0 = ANSI_PADDING is OFF |
||||||||||||||||||||
is_ansi_warnings_onis_ansi_warnings_on | bitbit | 1 = ANSI_WARNINGS は ON です。1 = ANSI_WARNINGS is ON 0 = ANSI_WARNINGS は OFF です。0 = ANSI_WARNINGS is OFF |
||||||||||||||||||||
is_arithabort_onis_arithabort_on | bitbit | 1 = ARITHABORT は ON です。1 = ARITHABORT is ON 0 = ARITHABORT は OFF です。0 = ARITHABORT is OFF |
||||||||||||||||||||
is_concat_null_yields_null_onis_concat_null_yields_null_on | bitbit | 1 = CONCAT_NULL_YIELDS_NULL は ON です。1 = CONCAT_NULL_YIELDS_NULL is ON 0 = CONCAT_NULL_YIELDS_NULL は OFF です。0 = CONCAT_NULL_YIELDS_NULL is OFF |
||||||||||||||||||||
is_numeric_roundabort_onis_numeric_roundabort_on | bitbit | 1 = NUMERIC_ROUNDABORT は ON です。1 = NUMERIC_ROUNDABORT is ON 0 = NUMERIC_ROUNDABORT は OFF です。0 = NUMERIC_ROUNDABORT is OFF |
||||||||||||||||||||
is_quoted_identifier_onis_quoted_identifier_on | bitbit | 1 = QUOTED_IDENTIFIER は ON です。1 = QUOTED_IDENTIFIER is ON 0 = QUOTED_IDENTIFIER は OFF です。0 = QUOTED_IDENTIFIER is OFF |
||||||||||||||||||||
is_recursive_triggers_onis_recursive_triggers_on | bitbit | 1 = RECURSIVE_TRIGGERS は ON です。1 = RECURSIVE_TRIGGERS is ON 0 = RECURSIVE_TRIGGERS は OFF です。0 = RECURSIVE_TRIGGERS is OFF |
||||||||||||||||||||
is_cursor_close_on_commit_onis_cursor_close_on_commit_on | bitbit | 1 = CURSOR_CLOSE_ON_COMMIT は ON です。1 = CURSOR_CLOSE_ON_COMMIT is ON 0 = CURSOR_CLOSE_ON_COMMIT は OFF です。0 = CURSOR_CLOSE_ON_COMMIT is OFF |
||||||||||||||||||||
is_local_cursor_defaultis_local_cursor_default | bitbit | 1 = CURSOR_DEFAULT はローカルです。1 = CURSOR_DEFAULT is local 0 = CURSOR_DEFAULT はグローバルです。0 = CURSOR_DEFAULT is global |
||||||||||||||||||||
is_fulltext_enabledis_fulltext_enabled | bitbit | 1 = データベースに対してフルテキストが有効です。1 = Full-text is enabled for the database 0 = データベースに対してフルテキストが無効です。0 = Full-text is disabled for the database |
||||||||||||||||||||
is_trustworthy_onis_trustworthy_on | bitbit | 1 = データベースは信頼できるものとしてマークされています。1 = Database has been marked trustworthy 0 = データベースは信頼できるものとしてマークされていません。0 = Database has not been marked trustworthy 既定では、復元またはアタッチされたデータベースの信頼が有効になっていません。By default, restored or attached databases have the trustworthy not enabled. |
||||||||||||||||||||
is_db_chaining_onis_db_chaining_on | bitbit | 1 = 複数データベースの組み合わせ所有権は ON です。1 = Cross-database ownership chaining is ON 0 = 複数データベースの組み合わせ所有権は OFF です。0 = Cross-database ownership chaining is OFF |
||||||||||||||||||||
is_parameterization_forcedis_parameterization_forced | bitbit | 1 = パラメーター化は FORCED です。1 = Parameterization is FORCED 0 = パラメーター化は SIMPLE です。0 = Parameterization is SIMPLE |
||||||||||||||||||||
is_master_key_encrypted_by_serveris_master_key_encrypted_by_server | bitbit | 1 = データベースは暗号化されたマスター キーを保有しています。1 = Database has an encrypted master key 0 = データベースは暗号化されたマスター キーを保有していません。0 = Database does not have an encrypted master key |
||||||||||||||||||||
is_query_store_onis_query_store_on | bitbit | 1 = このデータベースに対してクエリストアが有効になっています。1 = The query store is enable for this database. Sys.database_query_store_optionsをオンにして、クエリのストアの状態を表示します。Check sys.database_query_store_options to view the query store status. 0 = クエリストアが有効になっていません0 = The query store is not enabled 適用対象: SQL ServerSQL Server (SQL Server 2016 (13.x)SQL Server 2016 (13.x) 以降)。Applies to: SQL ServerSQL Server (starting with SQL Server 2016 (13.x)SQL Server 2016 (13.x)). |
||||||||||||||||||||
is_publishedis_published | bitbit | 1 = データベースは、トランザクション レプリケーション トポロジまたはスナップショット レプリケーション トポロジにおけるパブリケーション データベースです。1 = Database is a publication database in a transactional or snapshot replication topology 0 = パブリケーション データベースではありません。0 = Is not a publication database |
||||||||||||||||||||
is_subscribedis_subscribed | bitbit | この列は使用されません。This column is not used. データベースのサブスクライバーの状態に関係なく、常に 0 を返します。It will always return 0, regardless of the subscriber status of the database. | ||||||||||||||||||||
is_merge_publishedis_merge_published | bitbit | 1 = データベースは、マージ レプリケーション トポロジにおけるパブリケーション データベースです。1 = Database is a publication database in a merge replication topology 0 = マージ レプリケーション トポロジにおけるパブリケーション データベースではありません。0 = Is not a publication database in a merge replication topology |
||||||||||||||||||||
is_distributoris_distributor | bitbit | 1 = データベースは、レプリケーション トポロジにおけるディストリビューション データベースです。1 = Database is the distribution database for a replication topology 0 = レプリケーション トポロジにおけるディストリビューション データベースではありません。0 = Is not the distribution database for a replication topology |
||||||||||||||||||||
is_sync_with_backupis_sync_with_backup | bitbit | 1 = データベースはバックアップとのレプリケーション同期用に設定されています。1 = Database is marked for replication synchronization with backup 0 = バックアップとのレプリケーション同期用に設定されていません。0 = Is not marked for replication synchronization with backup |
||||||||||||||||||||
service_broker_guidservice_broker_guid | uniqueidentifieruniqueidentifier | このデータベースの Service Broker の識別子です。Identifier of the service broker for this database. ルーティング テーブルでターゲットの broker_instance として使用されます。Used as the broker_instance of the target in the routing table. | ||||||||||||||||||||
is_broker_enabledis_broker_enabled | bitbit | 1 = このデータベースのブローカーは現在メッセージを送受信中です。1 = The broker in this database is currently sending and receiving messages. 0 = このデータベースでは、すべての送信メッセージは転送キューにとどまり、受信メッセージはキューに配置されません。0 = All sent messages will stay on the transmission queue and received messages will not be put on queues in this database. 既定では、復元されたデータベースまたはアタッチされたデータベースでは、ブローカーは無効になります。By default, restored or attached databases have the broker disabled. ただし、フェールオーバー後にブローカーが有効になるデータベース ミラーリングは例外です。The exception to this is database mirroring where the broker is enabled after failover. |
||||||||||||||||||||
log_reuse_waitlog_reuse_wait | tinyinttinyint | トランザクションログ領域の再利用は、現在、最後のチェックポイントの時点で、次のいずれかを待機しています。Reuse of transaction log space is currently waiting on one of the following as of the last checkpoint. これらの値の詳細については、 トランザクションログを参照してください。For more detailed explanations of these values, see The Transaction Log. ValueValue 0 = なし0 = Nothing 1 = チェックポイント (データベースが復旧モデルを使用していて、メモリ最適化データファイルグループがある場合、列がまたはであることを確認する必要があります log_reuse_wait checkpoint xtp_checkpoint ) 11 = Checkpoint (When a database uses a recovery model and has a memory-optimized data filegroup, you should expect to see the log_reuse_wait column indicate checkpoint or xtp_checkpoint ) 12 = ログバックアップ 12 = Log Backup 1 3 = アクティブなバックアップまたは復元 13 = Active backup or restore 1 4 = アクティブなトランザクション 14 = Active transaction 1 5 = データベースミラーリング 15 = Database mirroring 1 6 = レプリケーション 16 = Replication 1 7 = データベーススナップショットの作成 17 = Database snapshot creation 1 8 = ログスキャン8 = Log scan 9 = Always On 可用性グループセカンダリレプリカは、このデータベースのトランザクションログレコードを対応するセカンダリデータベースに適用します。9 = An Always On Availability Groups secondary replica is applying transaction log records of this database to a corresponding secondary database. 22 9 = その他 (一時的) 39 = Other (Transient) 3 10 = 内部使用のみ 210 = For internal use only 2 11 = 内部使用のみ 211 = For internal use only 2 12 = 内部使用のみ 212 = For internal use only 2 13 = 最も古いページ 213 = Oldest page 2 14 = その他 214 = Other 2 16 = XTP_CHECKPOINT (データベースが復旧モデルを使用していて、メモリ最適化データファイルグループがある場合、列がまたはであることを確認する必要があります log_reuse_wait checkpoint xtp_checkpoint ) 416 = XTP_CHECKPOINT (When a database uses a recovery model and has a memory-optimized data filegroup, you should expect to see the log_reuse_wait column indicate checkpoint or xtp_checkpoint ) 41 に適用さ れます: SQL ServerSQL Server (以降 SQL Server 2008SQL Server 2008 )1 Applies to: SQL ServerSQL Server (starting with SQL Server 2008SQL Server 2008) 2 に適用さ れます: SQL ServerSQL Server (以降 SQL Server 2012 (11.x)SQL Server 2012 (11.x) )2 Applies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) 3 に適用さ れます: SQL ServerSQL Server (およびを含む SQL Server 2008 R2SQL Server 2008 R2 )3 Applies to: SQL ServerSQL Server (up to, and including SQL Server 2008 R2SQL Server 2008 R2) 4 に適用さ れます: SQL ServerSQL Server (以降 SQL Server 2014 (12.x)SQL Server 2014 (12.x) )4 Applies to: SQL ServerSQL Server (starting with SQL Server 2014 (12.x)SQL Server 2014 (12.x)) |
||||||||||||||||||||
log_reuse_wait_desclog_reuse_wait_desc | nvarchar(60)nvarchar(60) | 前回のチェックポイントの時点で現在待機中の、トランザクション ログ領域の再利用の理由の説明です。Description of reuse of transaction log space is currently waiting on as of the last checkpoint. | ||||||||||||||||||||
is_date_correlation_onis_date_correlation_on | bitbit | 1 = DATE_CORRELATION_OPTIMIZATION は ON です。1 = DATE_CORRELATION_OPTIMIZATION is ON 0 = DATE_CORRELATION_OPTIMIZATION は OFF です。0 = DATE_CORRELATION_OPTIMIZATION is OFF |
||||||||||||||||||||
is_cdc_enabledis_cdc_enabled | bitbit | 1 = データベースで変更データ キャプチャが有効になっています。1 = Database is enabled for change data capture. 詳細については、「 sys.sp_cdc_enable_db (transact-sql)」を参照してください。For more information, see sys.sp_cdc_enable_db (Transact-SQL). | ||||||||||||||||||||
is_encryptedis_encrypted | bitbit | データベースが暗号化されているかどうかを示します (は、句を使用して最後に設定された状態を反映し ALTER DATABASE SET ENCRYPTION ます)。Indicates whether the database is encrypted (reflects the state last set by using the ALTER DATABASE SET ENCRYPTION clause). 値は、次のいずれかです。Can be one of the following values:1 = 暗号化1 = Encrypted 0 = 暗号化されていない0 = Not Encrypted データベース暗号化の詳細については、「Transparent Data Encryption (TDE)」を参照してください。For more information about database encryption, see Transparent Data Encryption (TDE). データベースの暗号化が解除されている場合、には is_encrypted 値0が表示されます。If the database is in the process of being decrypted, is_encrypted shows a value of 0. [動的管理ビューの sys.dm_database_encryption_keys ] を使用すると、暗号化プロセスの状態を確認できます。You can see the state of the encryption process by using the sys.dm_database_encryption_keys dynamic management view. |
||||||||||||||||||||
is_honor_broker_priority_onis_honor_broker_priority_on | bitbit | データベースがメッセージ交換の優先度を優先するかどうかを示します (句を使用して最後に設定された状態を反映し ALTER DATABASE SET HONOR_BROKER_PRIORITY ます)。Indicates whether the database honors conversation priorities (reflects the state last set by using the ALTER DATABASE SET HONOR_BROKER_PRIORITY clause). 値は、次のいずれかです。Can be one of the following values:1 = HONOR_BROKER_PRIORITY は ON です。1 = HONOR_BROKER_PRIORITY is ON 0 = HONOR_BROKER_PRIORITY は OFF です。0 = HONOR_BROKER_PRIORITY is OFF 既定では、復元またはアタッチされたデータベースの broker の優先度はオフになっています。By default, restored or attached databases have the broker priority off. |
||||||||||||||||||||
replica_idreplica_id | uniqueidentifieruniqueidentifier | データベースが参加している可用性グループ (存在する場合) のローカル Always On 可用性グループAlways On availability groups 可用性レプリカの一意の識別子です。Unique identifier of the local Always On 可用性グループAlways On availability groups availability replica of the availability group, if any, in which the database is participating. NULL = データベースは可用性グループの可用性レプリカの一部ではありません。NULL = database is not part of an availability replica of in availability group. 適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) と Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) and later) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
group_database_idgroup_database_id | uniqueidentifieruniqueidentifier | データベースが参加している Always On 可用性グループ (存在する場合) 内のデータベースの一意識別子。Unique identifier of the database within an Always On availability group, if any, in which the database is participating. group_database_id は、プライマリレプリカのこのデータベースと、データベースが可用性グループに参加しているすべてのセカンダリレプリカで同じです。group_database_id is the same for this database on the primary replica and on every secondary replica on which the database has been joined to the availability group. NULL = データベースは、どの可用性グループの可用性レプリカの一部でもありません。NULL = database is not part of an availability replica in any availability group. 適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
resource_pool_idresource_pool_id | intint | このデータベースにマップされているリソースプールの id。The id of the resource pool that is mapped to this database. このリソースプールは、このデータベース内のメモリ最適化テーブルで使用できるメモリの合計を制御します。This resource pool controls total memory available to memory-optimized tables in this database. 適用対象: SQL ServerSQL Server (以降 SQL Server 2014 (12.x)SQL Server 2014 (12.x) )Applies to: SQL ServerSQL Server (starting with SQL Server 2014 (12.x)SQL Server 2014 (12.x)) |
||||||||||||||||||||
default_language_lciddefault_language_lcid | smallintsmallint | 包含データベースの既定の言語のローカル ID (LCID) を示します。Indicates the local id (lcid) of the default language of a contained database. 注: の default Language サーバー構成オプションの構成 として機能し sp_configure ます。Note: Functions as the Configure the default language Server Configuration Option of sp_configure . 非包含データベースの場合、この値は null です。This value is null for a non-contained database.適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
default_language_namedefault_language_name | nvarchar(128)nvarchar(128) | 包含データベースの既定の言語を示します。Indicates the default language of a contained database. 非包含データベースの場合、この値は null です。This value is null for a non-contained database. 適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) と Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) and later) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
default_fulltext_language_lciddefault_fulltext_language_lcid | intint | 包含データベースの既定のフルテキスト言語のロケール id (lcid) を示します。Indicates the locale id (lcid) of the default fulltext language of the contained database. 注: 既定の フルテキスト言語サーバー構成オプション の既定の構成として機能 sp_configure します。Note: Functions as the default Configure the default full-text language Server Configuration Option of sp_configure . 非包含データベースの場合、この値は null です。This value is null for a non-contained database.適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
default_fulltext_language_namedefault_fulltext_language_name | nvarchar(128)nvarchar(128) | 包含データベースの既定のフルテキスト言語を示します。Indicates the default fulltext language of the contained database. 非包含データベースの場合、この値は null です。This value is null for a non-contained database. 適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
is_nested_triggers_onis_nested_triggers_on | bitbit | 包含データベースで入れ子になったトリガーが許可されるかどうかを示します。Indicates whether or not nested triggers are allowed in the contained database. 0 = 入れ子になったトリガーは許可されません。0 = nested triggers are not allowed 1 = 入れ子になったトリガーは許可されます。1 = nested triggers are allowed 注: の関数は、の nested Triggers サーバー構成オプションを構成 し sp_configure ます。Note: Functions as the Configure the nested triggers Server Configuration Option of sp_configure . 非包含データベースの場合、この値は null です。This value is null for a non-contained database. 詳細については、「 transact-sql)(sys.configurations を参照してください。See sys.configurations (Transact-SQL) for further information.適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
is_transform_noise_words_onis_transform_noise_words_on | bitbit | 包含データベースでノイズ ワードを変換する必要があるかどうかを示します。Indicates whether or noise words should be transformed in the contained database. 0 = ノイズ ワードは変換する必要がありません。0 = noise words should not be transformed. 1 = ノイズ ワードは変換する必要があります。1 = noise words should be transformed. 注: の 変換ノイズワードのサーバー構成オプション として機能し sp_configure ます。Note: Functions as the transform noise words Server Configuration Option of sp_configure . 非包含データベースの場合、この値は null です。This value is null for a non-contained database. 詳細については、「 transact-sql)(sys.configurations を参照してください。See sys.configurations (Transact-SQL) for further information.適用対象: SQL ServerSQL Server (以降 SQL Server 2012 (11.x)SQL Server 2012 (11.x) )Applies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) |
||||||||||||||||||||
two_digit_year_cutofftwo_digit_year_cutoff | smallintsmallint | 2 桁の数字を 4 桁の西暦として解釈する場合の区切りの年を表す 1753 ~ 9999 の範囲の数値を示します。Indicates a value of a number between 1753 and 9999 to represent the cutoff year for interpreting two-digit years as four-digit years. 注: の 2 桁表記の年の切り捨てサーバー構成オプションの構成 として機能し sp_configure ます。Note: Functions as the Configure the two digit year cutoff Server Configuration Option of sp_configure . 非包含データベースの場合、この値は null です。This value is null for a non-contained database. 詳細については、「 transact-sql)(sys.configurations を参照してください。See sys.configurations (Transact-SQL) for further information.適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
containmentcontainment | tinyint not nulltinyint not null | データベースの包含状態を示します。Indicates the containment status of the database. 0 = データベースの包含がオフです。0 = database containment is off. 適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) and Azure SQL データベースAzure SQL Database 1 = データベースは部分的な含有に 適用さ れます: SQL ServerSQL Server (以降 SQL Server 2012 (11.x)SQL Server 2012 (11.x) )1 = database is in partial containment Applies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) |
||||||||||||||||||||
containment_desccontainment_desc | nvarchar (60) not nullnvarchar(60) not null | データベースの包含状態を示します。Indicates the containment status of the database. NONE = 従来のデータベース (包含なし)NONE = legacy database (zero containment) PARTIAL = 部分的包含データベースPARTIAL = partially contained database 適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) と Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) and later) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
target_recovery_time_in_secondstarget_recovery_time_in_seconds | intint | データベースの推定復旧時間 (秒) です。The estimated time to recover the database, in seconds. NULL 値は許可されます。Nullable. 適用対象: SQL ServerSQL Server (SQL Server 2012 (11.x)SQL Server 2012 (11.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2012 (11.x)SQL Server 2012 (11.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
delayed_durabilitydelayed_durability | intint | 遅延持続性の設定:The delayed durability setting: 0 = 無効0 = DISABLED 1 = 許可1 = ALLOWED 2 = 強制2 = FORCED 詳しくは、「トランザクションの持続性の制御」をご覧ください。For more information, see Control Transaction Durability. 適用対象: SQL ServerSQL Server (SQL Server 2014 (12.x)SQL Server 2014 (12.x) 以降) および Azure SQL データベースAzure SQL Database。Applies to: SQL ServerSQL Server (starting with SQL Server 2014 (12.x)SQL Server 2014 (12.x)) and Azure SQL データベースAzure SQL Database. |
||||||||||||||||||||
delayed_durability_descdelayed_durability_desc | nvarchar(60)nvarchar(60) | 遅延持続性の設定:The delayed durability setting: DISABLEDDISABLED ALLOWEDALLOWED FORCEDFORCED 適用対象: SQL ServerSQL Server (SQL Server 2014 (12.x)SQL Server 2014 (12.x) 以降) および Azure SQL データベースAzure SQL Database。Applies to: SQL ServerSQL Server (starting with SQL Server 2014 (12.x)SQL Server 2014 (12.x)) and Azure SQL データベースAzure SQL Database. |
||||||||||||||||||||
is_memory_optimized_elevate_to_snapshot_onis_memory_optimized_elevate_to_snapshot_on | bitbit | セッション設定 TRANSACTION ISOLATION LEVEL が低い分離レベル (READ COMMITTED または READ UNCOMMITTED) に設定されている場合は、SNAPSHOT 分離を使用してメモリ最適化テーブルにアクセスします。Memory-optimized tables are accessed using SNAPSHOT isolation when the session setting TRANSACTION ISOLATION LEVEL is set to a lower isolation level, READ COMMITTED or READ UNCOMMITTED. 1 = 最小分離レベルは SNAPSHOT です。1 = Minimum isolation level is SNAPSHOT. 0 = 分離レベルは昇格されません。0 = Isolation level is not elevated. |
||||||||||||||||||||
is_federation_memberis_federation_member | bitbit | データベースがフェデレーションのメンバーであるかどうかを示します。Indicates if the database is a member of a federation. 適用対象: Azure SQL データベースAzure SQL DatabaseApplies to: Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
is_remote_data_archive_enabledis_remote_data_archive_enabled | bitbit | データベースが拡張されているかどうかを示します。Indicates whether the database is stretched. 0 = データベースは Stretch 対応ではありません。0 = The database is not Stretch-enabled. 1 = データベースは Stretch に対応しています。1 = The database is Stretch-enabled. 適用対象: SQL ServerSQL Server (以降 SQL Server 2016 (13.x)SQL Server 2016 (13.x) )Applies to: SQL ServerSQL Server (starting with SQL Server 2016 (13.x)SQL Server 2016 (13.x)) 詳細については、「Stretch Database」を参照してください。For more information, see Stretch Database. |
||||||||||||||||||||
is_mixed_page_allocation_onis_mixed_page_allocation_on | bitbit | データベース内のテーブルとインデックスが混合エクステントから初期ページを割り当てることができるかどうかを示します。Indicates whether tables and indexes in the database can allocate initial pages from mixed extents. 0 = データベース内のテーブルとインデックスは、常に最初のページを一様なエクステントから割り当てます。0 = Tables and indexes in the database always allocate initial pages from uniform extents. 1 = データベース内のテーブルとインデックスは、混合エクステントから初期ページを割り当てることができます。1 = Tables and indexes in the database can allocate initial pages from mixed extents. 詳細については、「 SET MIXED_PAGE_ALLOCATION transact-sql)(の ALTER Database SET オプション のオプション」を参照してください。For more information, see the SET MIXED_PAGE_ALLOCATION option of ALTER DATABASE SET Options (Transact-SQL).適用対象: SQL ServerSQL Server (以降 SQL Server 2016 (13.x)SQL Server 2016 (13.x) )Applies to: SQL ServerSQL Server (starting with SQL Server 2016 (13.x)SQL Server 2016 (13.x)) |
||||||||||||||||||||
is_temporal_history_retention_enabledis_temporal_history_retention_enabled | bitbit | テンポラル保持ポリシーのクリーンアップタスクが有効かどうかを示します。Indicates whether temporal retention policy cleanup task is enabled. 1 = テンポラルリテンション期間が有効1 = temporal retention is enabled 0 = 一時的な保持は無効0 = temporal retention is disabled 適用対象: SQL ServerSQL Server (SQL Server 2017 (14.x)SQL Server 2017 (14.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2017 (14.x)SQL Server 2017 (14.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
catalog_collation_typecatalog_collation_type | intint | カタログの照合順序の設定:The catalog collation setting: 0 = DATABASE_DEFAULT0 = DATABASE_DEFAULT 2 = SQL_Latin_1_General_CP1_CI_AS2 = SQL_Latin_1_General_CP1_CI_AS 適用対象: Azure SQL データベースAzure SQL DatabaseApplies to: Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
catalog_collation_type_desccatalog_collation_type_desc | nvarchar(60)nvarchar(60) | カタログの照合順序の設定:The catalog collation setting: COLLATEDATABASE_DEFAULT SQL_Latin_1_General_CP1_CI_ASSQL_Latin_1_General_CP1_CI_AS 適用対象: Azure SQL データベースAzure SQL DatabaseApplies to: Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
physical_database_namephysical_database_name | nvarchar(128)nvarchar(128) | の場合、 SQL ServerSQL Server データベースの物理名。For SQL ServerSQL Server, the physical name of the database. の場合 Azure SQL データベースAzure SQL Database 、サーバー上のデータベースの一般的な id です。For Azure SQL データベースAzure SQL Database, a common id for the databases on a server. 適用対象: SQL ServerSQL Server (SQL Server 2019 (15.x)SQL Server 2019 (15.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2019 (15.x)SQL Server 2019 (15.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
is_result_set_caching_onis_result_set_caching_on | bitbit | 結果セットのキャッシュが有効かどうかを示します。Indicates whether result set caching is enabled. 1 = 結果セットのキャッシュが有効1 = result set caching is enabled 0 = 結果セットのキャッシュが無効0 = result set caching is disabled 適用対象: Azure Synapse AnalyticsAzure Synapse Analytics Gen2。Applies to: Azure Synapse AnalyticsAzure Synapse Analytics Gen2. この機能はすべてのリージョンにロールアウトされていますが、ご使用のインスタンスにデプロイされているバージョンと、利用可能な機能については、最新の Azure Synapse リリースノート と Gen2 アップグレードスケジュール をご確認ください。While this feature is being rolled out to all regions, please check the version deployed to your instance and the latest Azure Synapse release notes and Gen2 upgrade schedule for feature availability. |
||||||||||||||||||||
is_accelerated_database_recovery_onis_accelerated_database_recovery_on | bitbit | 高速データベース回復 (ADR) が有効かどうかを示します。Indicates whether Accelerated Database Recovery (ADR) is enabled. 1 = ADR が有効1 = ADR is enabled 0 = ADR は無効です。0 = ADR is disabled 適用対象: SQL ServerSQL Server (SQL Server 2019 (15.x)SQL Server 2019 (15.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2019 (15.x)SQL Server 2019 (15.x)) and Azure SQL データベースAzure SQL Database |
||||||||||||||||||||
is_tempdb_spill_to_remote_storeis_tempdb_spill_to_remote_store | bitbit | リモートストアへの tempdb の書き込みが有効になっているかどうかを示します。Indicates whether tempdb spill to remote store is enabled. 1 = 有効1 = enabled 0 = 無効0 = disabled 適用対象: Azure Synapse AnalyticsAzure Synapse Analytics Gen2。Applies to: Azure Synapse AnalyticsAzure Synapse Analytics Gen2. この機能はすべてのリージョンにロールアウトされていますが、ご使用のインスタンスにデプロイされているバージョンと、利用可能な機能については、最新の Azure Synapse リリースノート と Gen2 アップグレードスケジュール をご確認ください。While this feature is being rolled out to all regions, please check the version deployed to your instance and the latest Azure Synapse release notes and Gen2 upgrade schedule for feature availability. |
||||||||||||||||||||
is_stale_page_detection_onis_stale_page_detection_on | bitbit | 古いページ検出が有効になっているかどうかを示します。Indicates whether stale page detection is enabled. 1 = 古いページ検出が有効になっている1 = stale page detection is enabled 0 = 古いページ検出は無効になっています0 = stale page detection is disabled 適用対象: Azure Synapse AnalyticsAzure Synapse Analytics Gen2。Applies to: Azure Synapse AnalyticsAzure Synapse Analytics Gen2. この機能はすべてのリージョンにロールアウトされていますが、ご使用のインスタンスにデプロイされているバージョンと、利用可能な機能については、最新の Azure Synapse リリースノート と Gen2 アップグレードスケジュール をご確認ください。While this feature is being rolled out to all regions, please check the version deployed to your instance and the latest Azure Synapse release notes and Gen2 upgrade schedule for feature availability. |
||||||||||||||||||||
is_memory_optimized_enabledis_memory_optimized_enabled | bitbit | ハイブリッドバッファープールなどの特定の In-Memory 機能がデータベースに対して有効かどうかを示します。Indicates whether certain In-Memory features, such as Hybrid Buffer Pool, are enabled for the database. インメモリ OLTPの可用性または構成の状態は反映されません。Does not reflect the availability or configuration state of In-Memory OLTP. 1 = メモリ最適化機能が有効になっている1 = memory-optimized features are enabled 0 = メモリ最適化機能は無効です。0 = memory-optimized features are disabled 適用対象: SQL ServerSQL Server (SQL Server 2019 (15.x)SQL Server 2019 (15.x) 以降) および Azure SQL データベースAzure SQL DatabaseApplies to: SQL ServerSQL Server (starting with SQL Server 2019 (15.x)SQL Server 2019 (15.x)) and Azure SQL データベースAzure SQL Database |
アクセス許可Permissions
の呼び出し元 sys.databases
がデータベースの所有者ではなく、データベースがまたはではない場合、 master
対応する行を tempdb
表示するために必要な最低限の権限は、 ALTER ANY DATABASE
または VIEW ANY DATABASE
CREATE DATABASE
データベース内のサーバーレベルの権限、または権限です master
。If the caller of sys.databases
is not the owner of the database and the database is not master
or tempdb
, the minimum permissions required to see the corresponding row are ALTER ANY DATABASE
or the VIEW ANY DATABASE
server-level permission, or CREATE DATABASE
permission in the master
database. 呼び出し元が接続されているデータベースは、常にで表示でき sys.databases
ます。The database to which the caller is connected can always be viewed in sys.databases
.
重要
既定では、public ロールには権限が付与されているの VIEW ANY DATABASE
で、すべてのログインでデータベース情報を参照できます。By default, the public role has the VIEW ANY DATABASE
permission, allowing all logins to see database information. データベースを検出する権限、 REVOKE
VIEW ANY DATABASE
からの権限、 public
または DENY
VIEW ANY DATABASE
個々のログインに対する権限をブロックする権限。To block a login from the ability to detect a database, REVOKE
the VIEW ANY DATABASE
permission from public
, or DENY
the VIEW ANY DATABASE
permission for individual logins.
Azure SQL Database 解説Azure SQL Database Remarks
Azure SQL データベースAzure SQL Databaseこのビューは、 master
データベースとユーザーデータベースで使用できます。In Azure SQL データベースAzure SQL Database this view is available in the master
database and in user databases. データベースでは、このビューには、 master
master
サーバー上のデータベースとすべてのユーザーデータベースに関する情報が返されます。In the master
database, this view returns the information on the master
database and all user databases on the server. ユーザー データベースでは、このビューには、現在のデータベースと master データベースのみの情報が返されます。In a user database, this view returns information only on the current database and the master database.
新しいデータベースが作成される Azure SQL データベースAzure SQL Database サーバーの master
データベースの sys.databases
ビューを使用します。Use the sys.databases
view in the master
database of the Azure SQL データベースAzure SQL Database server where the new database is being created. データベースのコピーが開始されたら、コピー sys.databases
先サーバーのデータベースからおよびビューに対してクエリを実行し、 sys.dm_database_copies
master
コピーの進行状況に関する詳細情報を取得できます。After the database copy starts, you can query the sys.databases
and the sys.dm_database_copies
views from the master
database of the destination server to retrieve more information about the copying progress.
例Examples
A.A. sys.databases ビューに対するクエリQuery the sys.databases view
次の例では、ビューで使用できる列のいくつかを返し sys.databases
ます。The following example returns a few of the columns available in the sys.databases
view.
SELECT name, user_access_desc, is_read_only, state_desc, recovery_model_desc
FROM sys.databases;
B.B. SQL DatabaseSQL Database でのコピーの進行状況を確認します。Check the copying status in SQL DatabaseSQL Database
次の例では、ビューとビューに対してクエリを実行し、 sys.databases
sys.dm_database_copies
データベースのコピー操作に関する情報を返します。The following example queries the sys.databases
and sys.dm_database_copies
views to return information about a database copy operation.
適用対象: Azure SQL データベースAzure SQL DatabaseApplies to: Azure SQL データベースAzure SQL Database
-- Execute from the master database.
SELECT a.name, a.state_desc, b.start_date, b.modify_date, b.percent_complete
FROM sys.databases AS a
INNER JOIN sys.dm_database_copies AS b ON a.database_id = b.database_id
WHERE a.state = 7;
C.C. の一時リテンション期間ポリシーの状態を確認します。 SQL DatabaseSQL DatabaseCheck the temporal retention policy status in SQL DatabaseSQL Database
次の例では、をクエリして、 sys.databases
テンポラル保持クリーンアップタスクが有効になっているかどうかの情報を返します。The following example queries the sys.databases
to return information whether temporal retention cleanup task is enabled. 復元操作の後、テンポラルリテンション期間は既定で無効になっていることに注意してください。Be aware that after restore operation temporal retention is disabled by default. を使用し ALTER DATABASE
て、明示的に有効にします。Use ALTER DATABASE
to enable it explicitly.
適用対象: Azure SQL データベースAzure SQL DatabaseApplies to: Azure SQL データベースAzure SQL Database
-- Execute from the master database.
SELECT a.name, a.is_temporal_history_retention_enabled
FROM sys.databases AS a;
次のステップNext steps
- ALTER DATABASE (Transact-SQL)ALTER DATABASE (Transact-SQL)
- sys.database_mirroring_witnesses (Transact-SQL)sys.database_mirroring_witnesses (Transact-SQL)
- sys.database_recovery_status (Transact-sql)sys.database_recovery_status (Transact-SQL)
- データベースとファイルのカタログ ビュー (Transact-SQL)Databases and Files Catalog Views (Transact-SQL)
- sys.dm_database_copies (Azure SQL Database)sys.dm_database_copies (Azure SQL Database)