How to find where sp_spaceused is being executed from?

  • I inherited an environment where a couple of times a day, we start getting a single spid blocking other spids which causes errors in the application. In researching it using sp_who2, I see the command as DBCC, the program as OSQL-32 and the execution as sp_spaceused @updateusage = 'TRUE'. This runs for 15 minutes or so and then the errors go away because the spid is no longer blocking.

    I don't know where this is being executed from? I have researched the jobs that are scheduled in Windows during that time and don't see it. I have looked at SQL schedules and don't see it. Is there an easy way to track down where this is coming from?

  • Set up a profiler trace or extended events session. If it's running at predicatable times, should be easy to catch

    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
  • Thank you! We will try the profiler trace on Monday and see if it gives us any information on what is causing the sp_spaceused to be executed.

  • Hi - did you find from where it's running? I'm having the problem. Any clue will help.

    Thanks,

    Irina

  • Sorry, no we never did figure it out but were able to work around the issue we were experiencing.

Viewing 5 posts - 1 through 4 (of 4 total)

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