• Dean Jones (5/11/2009)


    Also, I thought it was the other way around according to MS

    To remove the trace definition you need to set the status to 0 (stopped) and then set the status to 2 (close and delete)

    Sorry, you're right. I read one thing and wrote something else

    When it says deleted, what do you actually mean by this, If you mean deleted the trace definition, I can still see this by running

    SELECT * FROM ::fn_trace_getinfo(NULL), even though proeprty 5 would be set to 0. I was expecting not to find anything from the table at all to give full confidence that its been totally deleted.

    Is it the same trace? It's not perhaps another one running?

    Is the setting of the status succeeding? It may not throw an error, will just return a non-zero code.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass