???SQL Server Audit??????????
???????????? ???????[ 2015/1/23 11:18:20 ] ????????SQL ?????
????????????????????????????????????????????ī?????????????SQL Server????????????????????????????????????????????????????????????????Trace??CDC????Trace??????????????????????????????????CDC?????????????SQL Server Audit?????????????
??????SQL Server?У????????????????????????????????????????????伴??????????£?
????SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName?? last_user_update??*
????FROM sys.dm_db_index_usage_stats
????WHERE database_id = DB_ID( 'DateBaseName')
????AND OBJECT_ID=OBJECT_ID('TableName')
???????????????????????????????????????????????????Server Audit??Server Audit???????????????????洢???????????????????????????????????????????????????????
??????????????????T-SQL????
USE master
CREATE SERVER AUDIT audit1 TO FILE (FILEPATH='D:SQLAudit')
USE AdventureWorks2012
CREATE DATABASE AUDIT SPECIFICATION SerialPic FOR SERVER AUDIT audit1
ADD(UPDATE??INSERT??DELETE ON Person.Address by dbo)
USE master
CREATE SERVER AUDIT audit1 TO FILE (FILEPATH='D:SQLAudit')
USE AdventureWorks2012
CREATE DATABASE AUDIT SPECIFICATION SerialPic FOR SERVER AUDIT audit1
ADD(UPDATE??INSERT??DELETE ON Person.Address by dbo)
|
????????????????????????????????????????D??SQLAudit?У????????????????????????????????????У?????Person.Address???Update??Insert??Delete??????
??????????????????????Person.Address??????-????2????????????1?????
?????1.????????
??????????2?????
?????????????????????????????????????Щ???????????UI?????????????T-SQL????????????
????SELECT * FROM
????fn_get_audit_file('D:SQLAuditaudit1_B8A7821A-D735-446D-B6FA-DF582AB80375_0_130648999540780000.sqlaudit'?? default?? default)
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11