謝謝老土,我做了這個audit,但是

回答: Auditing SQL Agent job creation and deletion美國老土2011-08-08 16:17:36

謝謝老土,我做了這個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])

 

 

 

所有跟帖: 

query sys.dm_audit_actions for every audit action that can be r -美國老土- 給 美國老土 發送悄悄話 美國老土 的博客首頁 (1112 bytes) () 08/08/2011 postreply 22:46:25

請您先登陸,再發跟帖!