Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

DBCC TraceOn – some processes are global.

Hi,

I was recently doing some testing as I thought that I’d experiment with the ghost clean up process.

I found that I needed to enable Trace Flag 661 to disable this process.
So off I went and ran the following code

DBCC TRACEON(661);
GO

I then stated inserting records and deleting records, but I suddenly noticed (using DBCC PAGE) that my records were still being cleaned up.

So I ran the following code

DBCC TRACESTATUS;
GO

and got the results

which made me think.

This task is a global task and needs to be enabled globally, like so

DBCC TRACEON(661 , -1);
GO

I’ve not run into his before, so lesson learnt. Global processes seem to need the extra -1 parameter – you don’t seem able to say “keep running the global process – just miss it out on this particular database.”

Have a good day.

Cheers

Martin.

Comments

Posted by Anonymous on 25 April 2011

Pingback from  @martinznz posts DBCC TraceOn ??? some processes are global. | sqlmashup

Posted by Radiance on 6 June 2014

Gentle hint

Leave a Comment

Please register or log in to leave a comment.