how to audit: interview question

  • one user fires a query and another user fires the same query on same table.. the 1st user query runs but the second user couldnt? how to know the problem, how to troubleshoot it.

  • rk2150 (8/9/2011)


    one user fires a query and another user fires the same query on same table.. the 1st user query runs but the second user couldnt? how to know the problem, how to troubleshoot it.

    What query(DML) are you referring ?

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • run a trace

    Jayanth Kurup[/url]

  • rk2150 (8/9/2011)


    one user fires a query and another user fires the same query on same table.. the 1st user query runs but the second user couldnt? how to know the problem, how to troubleshoot it.

    Could you expand upon that?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • serverside trace thats always running, looking for deadlock events, deadlock chains and lock timeouts.

    For extra points describe how the trace files are set to a max size to ensure they dont consume the entire drive they are located on, that the files rollover after a set number of files are created, and that you picked this number as it ensures the trace data is available for up to a week or more without being over-written to ensure you can debug issues such as this.

  • Ask the user (or check the application logs) for what the error was.

    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
  • Its DML operation.. I am two month old to sql server and been attending for interviews.

  • It sounds like they were trying to get you talk about blocking which is caused when a resource is locked by one user, preventing the next user from accessing it.

    Or, it's possible that they may have been talking about a deadlock situation. It's kind of hard to know from your description.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • one might observe that not knowing the answer led to the correct decision! Be aware that when I interview I always ask how after getting the answer to a question, if that makes sense?

    so knowing it was blocking/deadlock would not be enough I'd want to know exactly how you would identify what was blocking/deadlocking e.g. which events/trace flags / queries etc. etc.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • colin.Leversuch-Roberts (8/9/2011)


    one might observe that not knowing the answer led to the correct decision!

    And I like to ask one question that I know the candidate cannot answer (eg how many GAM pages would you find in a 7GB log file). Point isn't to see if they know, point is to see if they'll admit they don't.

    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

Viewing 10 posts - 1 through 9 (of 9 total)

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