sys.database_audit_specifications (Transact-SQL)sys.database_audit_specifications (Transact-SQL)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

包含服务器实例上的 SQL ServerSQL Server 审核中的数据库审核规范的相关信息。Contains information about the database audit specifications in a SQL ServerSQL Server audit on a server instance. 有关详细信息,请参阅 SQL Server Audit(数据库引擎)For more information, see SQL Server Audit (Database Engine).

列名称Column name 数据类型Data type 说明Description
名称Name sysnamesysname 审核规范的名称。Name of the auditing specification.
database_specification_iddatabase_specification_id intint 数据库规范的 ID。ID of the database specification.
create_datecreate_date datetimedatetime 创建审核规范的日期。Date the audit specification was created.
modified_datemodified_date datetimedatetime 上次修改审核规范的日期。Date the audit specification was last modified.
is_state_enabledis_state_enabled bitbit 审核规范状态:Audit specification state:

0-已禁用0 - DISABLED

1-已启用1 -ENABLED
audit_GUIDaudit_GUID uniqueidentiferuniqueidentifer 包含此规范的审核的 GUID。GUID for the audit that contains this specification. 在数据库附加/启动期间枚举成员数据库审核规范时使用。Used during enumeration of member database audit specifications during database attach/startup.

备注Remarks

如果数据库处于只读模式下,则 SQL ServerSQL Server Audit 功能无法添加数据库审核规范。If a database is in ready-only mode, the SQL ServerSQL Server Audit feature cannot add Database Audit Specifications.

权限Permissions

具有 ALTER ANY DATABASE AUDITVIEW DEFINITION 权限的主体、dbo 角色和 db_owners 固定数据库角色的成员都有权访问此目录视图。Principals with the ALTER ANY DATABASE AUDIT or VIEW DEFINITION permissions, the dbo role, and members of the db_owners fixed database role have access to this catalog view. 此外,不能拒绝主体 VIEW DEFINITION 权限。In addition, the principal must not be denied VIEW DEFINITION permission.

目录视图中仅显示用户拥有的安全对象的元数据,或用户对其拥有某些权限的安全对象的元数据。The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission... 有关详细信息,请参阅 Metadata Visibility ConfigurationFor more information, see Metadata Visibility Configuration.

另请参阅See Also

CREATE SERVER AUDIT (Transact-SQL) CREATE SERVER AUDIT (Transact-SQL)
ALTER SERVER AUDIT (Transact-SQL) ALTER SERVER AUDIT (Transact-SQL)
DROP SERVER AUDIT (Transact-SQL) DROP SERVER AUDIT (Transact-SQL)
CREATE SERVER AUDIT SPECIFICATION (Transact-SQL) CREATE SERVER AUDIT SPECIFICATION (Transact-SQL)
ALTER SERVER AUDIT SPECIFICATION (Transact-SQL) ALTER SERVER AUDIT SPECIFICATION (Transact-SQL)
DROP SERVER AUDIT SPECIFICATION (Transact-SQL) DROP SERVER AUDIT SPECIFICATION (Transact-SQL)
CREATE DATABASE AUDIT SPECIFICATION (Transact-SQL) CREATE DATABASE AUDIT SPECIFICATION (Transact-SQL)
ALTER DATABASE AUDIT SPECIFICATION (Transact-SQL) ALTER DATABASE AUDIT SPECIFICATION (Transact-SQL)
DROP DATABASE AUDIT SPECIFICATION (Transact-SQL) DROP DATABASE AUDIT SPECIFICATION (Transact-SQL)
ALTER AUTHORIZATION (Transact-SQL) ALTER AUTHORIZATION (Transact-SQL)
sys.fn_get_audit_file (Transact-SQL) sys.fn_get_audit_file (Transact-SQL)
sys.server_audits (Transact-SQL) sys.server_audits (Transact-SQL)
sys.server_file_audits (Transact-SQL) sys.server_file_audits (Transact-SQL)
sys.server_audit_specifications (Transact-SQL) sys.server_audit_specifications (Transact-SQL)
sys.server_audit_specification_details (Transact-SQL) sys.server_audit_specification_details (Transact-SQL)
sys.database_audit_specification_details (Transact-SQL) sys.database_audit_specification_details (Transact-SQL)
sys.dm_server_audit_status (Transact-SQL) sys.dm_server_audit_status (Transact-SQL)
sys.dm_audit_actions (Transact-SQL) sys.dm_audit_actions (Transact-SQL)
sys.dm_audit_class_type_map (Transact-SQL) sys.dm_audit_class_type_map (Transact-SQL)
创建服务器审核和服务器审核规范Create a Server Audit and Server Audit Specification