question

KCG avatar image
KCG asked

Cannot disable audit job in SQL 2008 R2

Have sql 2008R2 instance in a virtual cluster with a sql 2012 instance in an active/active mode. When I try to disable the audit job to redirect where the files are stored, the open trans hangs and I cannot kill it. The only thing I can do is restart the instance, which has to be scheduled because of the db's being used 24/7. Main issue is how to disable the job. Here is script I am using : ALTER SERVER AUDIT Db and user audit STATE = OFF; GO
sql2008r2
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
simiganesh avatar image
simiganesh answered
To disable the server audit you need to use below Alter server Audit with state=off In the post i see you want to change the location of the audit file.Below can be followed for it. Alter server Audit with state=off Alter server Audit TO FILE (FILEPATH ='', MAXSIZE = 10MB, RESERVE_DISK_SPACE=OFF) WITH (QUEUE_DELAY = 100, ON_FAILURE = CONTINUE); GO Alter server Audit with state=ON
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.