謝謝老土,我做了這個Audit, 但是Audit 結果放在application log裏麵,而且所有信息是在一個message裏, 怎樣能輸出這些信息,生成我需要的報表。
CREATE SERVER AUDIT [My-SQLAgent Audit]
TO APPLICATION_LOG
WITH
( QUEUE_DELAY = 1000
,ON_FAILURE = CONTINUE
,AUDIT_GUID = 'af42e922-6b3b-4b4e-a633-4d314addcefe'
)
GO
USE[msdb]
GO
alter DATABASE AUDIT SPECIFICATION [my sample]
FOR SERVER AUDIT [My-SQLAgent Audit]
ADD (UPDATE ON OBJECT::[dbo].[sp_update_job] BY [dbo]),
ADD (UPDATE ON OBJECT::[dbo].[sp_update_job] BY [SQLAgentUserRole]),
ADD (EXECUTE ON OBJECT::[dbo].[sp_delete_job] BY [dbo]),
ADD (EXECUTE ON OBJECT::[dbo].[sp_delete_job] BY [SQLAgentUserRole]),
ADD (EXECUTE ON OBJECT::[dbo].[sp_add_job] BY [dbo]),
ADD (EXECUTE ON OBJECT::[dbo].[sp_add_job] BY [SQLAgentUserRole])