| title | sys.dm_audit_class_type_map (Transact-SQL) | ||||
|---|---|---|---|---|---|
| description | sys.dm_audit_class_type_map returns a table that lists securable classes that can be mapped to the class_type column in the audit log. | ||||
| author | sravanisaluru | ||||
| ms.author | srsaluru | ||||
| ms.reviewer | randolphwest | ||||
| ms.date | 11/25/2024 | ||||
| ms.service | sql | ||||
| ms.subservice | system-objects | ||||
| ms.topic | reference | ||||
| f1_keywords |
|
||||
| helpviewer_keywords |
|
||||
| dev_langs |
|
||||
| monikerRange | =azuresqldb-current || >=sql-server-2016 || =azuresqldb-mi-current |
[!INCLUDE sql-asdb-asdbmi]
Returns a table that lists securable classes that can be mapped to the class_type column in the audit log. For more information about [!INCLUDE ssNoVersion] Audit, see SQL Server Audit (Database Engine).
| Column name | Data type | Description |
|---|---|---|
class_type |
char(2) | The class type of the entity that was audited. Maps to the class_type written to the audit log returned by the get_audit_file() function. Isn't nullable. |
class_type_desc |
nvarchar(120) | The name of the class of the object that was audited. Isn't nullable. |
securable_class_desc |
nvarchar(120) | The securable class that maps to the class_type being audited. NULL if the class_type doesn't map to a securable object. Can be joined with class_desc in sys.dm_audit_actions. |
This view is visible to the public.
To use the sys.fn_get_audit_file function, [!INCLUDE sssql19-md] and earlier versions require CONTROL SERVER permission on the server, while [!INCLUDE sssql22-md] and later versions require VIEW SERVER SECURITY AUDIT permission on the server.
This [!INCLUDE ssnoversion-md] example reads a locally stored Audit file and joins it with the sys.dm_audit_class_type_map view.
SELECT *
FROM sys.fn_get_audit_file('D:\SQLData\Audits\*.sqlaudit', DEFAULT, DEFAULT) AS audit_file
INNER JOIN sys.dm_audit_class_type_map AS dm_audit_class_type_map
ON audit_file.class_type = dm_audit_class_type_map.class_type;
GO- CREATE SERVER AUDIT (Transact-SQL)
- ALTER SERVER AUDIT (Transact-SQL)
- DROP SERVER AUDIT (Transact-SQL)
- CREATE SERVER AUDIT SPECIFICATION (Transact-SQL)
- ALTER SERVER AUDIT SPECIFICATION (Transact-SQL)
- DROP SERVER AUDIT SPECIFICATION (Transact-SQL)
- CREATE DATABASE AUDIT SPECIFICATION (Transact-SQL)
- ALTER DATABASE AUDIT SPECIFICATION (Transact-SQL)
- DROP DATABASE AUDIT SPECIFICATION (Transact-SQL)
- ALTER AUTHORIZATION (Transact-SQL)
- sys.fn_get_audit_file (Transact-SQL)
- sys.server_audits (Transact-SQL)
- sys.server_file_audits (Transact-SQL)
- sys.server_audit_specifications (Transact-SQL)
- sys.server_audit_specification_details (Transact-SQL)
- sys.database_audit_specifications (Transact-SQL)
- sys.database_audit_specification_details (Transact-SQL)
- sys.dm_server_audit_status (Transact-SQL)
- sys.dm_audit_class_type_map
- Create a Server Audit and Server Audit Specification