Deleted store procedure

  • Interesting because a stored proc create/drop is in my Schema Changes History report on 2008. That is supposed to come from the default trace.

    If I run this:

    SELECT

    *

    FROM ::fn_trace_gettable('C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\log_18.trc',0)

    INNER JOIN sys.trace_events e

    ON eventclass = trace_event_id

    INNER JOIN sys.trace_categories AS cat

    ON e.category_id = cat.category_id

    WHERE databasename = 'db1' AND

    objectname IS NULL AND --filter by objectname

    e.category_id = 5

    I see object create/ alter, and drop. Perhaps it's a 2008 thing?

  • How can I do it default trace for 2000? this is for 2005 and I am sorry I posted in in 2005. Thank you

  • Default trace was a new feature in 2005. In 2000, you have to setup a trace.

    You can see how to setup a trace from this Microsoft Article.

    http://support.microsoft.com/kb/283790

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • homebrew01 (5/19/2010)


    Default trace doesn't capture Stored Proc create & drop ... according to my test just now. The default trace never seems to have what I need, so I set up my own server side trace to track things.

    I think I'm wrong. When I run Steve's query (but with objectname IS NOT NULL), I do get results that say an object was created & deleted and gives the Object_Name, but Text_Data is NULL, so I was looking in the wrong column.

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply