Blog Post

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.

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating