Tracking users to SPIDS in logs

  • I have had two occurances where staff people have shut down the SQL Server Service (and fail to restart it) but nobody is owning up to it.

    The logs show that SPID 53 made several configuration changes before they shut down the server.

    I would like to be able to link a user to a SPID in order to determine who the person is and get the situation corrected.

    What approaches would you recommend for tracking who is doing what on the server?

  • Have you got anything in your default trace (SQL Server 2005 has a trace running by default that keeps track of certain operations, among others sp_configure excutions if the confuguration options have changed.

    You can read this with a query like:


    SELECT * FROM fn_trace_gettable('C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\log.trc', default);
    GO

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Perfect.

    Thank you.

  • Turn on SQL Server 2005 Black box functionality so you can see exactly what happened to the server before it went down.

    http://blogs.msdn.com/sqlserverstorageengine/archive/2007/06/03/sql-server-s-black-box.aspx

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

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