Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Posts
    6

    Unanswered: How can check if a specific command had been run

    i need to know if sp_sysmon stored procedure or dbcc monitor command ran and when.
    mabye by checking the transaction log or in another creative way
    any suggestions ?

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    you can modify sp_sysmon to capture the @end_table datetime into a user table.

  3. #3
    Join Date
    Jan 2006
    Posts
    6

    without changing any stored procedures

    Quote Originally Posted by willy_and_the_ci
    you can modify sp_sysmon to capture the @end_table datetime into a user table.

    Hi,
    thanks alot for the response. its a good solution but i need one that doesnt include changing any stored procedure.
    thanks,
    gilp.

  4. #4
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    sp_sysmon does not keep any record of last run. Another approach is auditing, which seems bit of an overkill. Or you can get the MDA tables to cache and filter out the sp_sysmon runs.

  5. #5
    Join Date
    Aug 2004
    Posts
    38

    How about the errorlog?

    Every time a sysmon runs, the server writes a DBCC TRACEON 8399 message to the errorlog. Don't know if you can use this? If it has to be in the server, it wouldn't be difficult to write a script that parses the log and makes an insert somewhere, whenever a new line is found.

    I'm pretty sure that nothing else sets traceon 8399, and there's no reason to set it yourself while connected.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •