Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009

    Question Unanswered: How to make a log of entered queries

    Is there any way to make a log for all the queries which come in the database remotely from an application or entered in the query window.

    I am talking about SQL Server 2000

    Please tell me a solution ASAP thanx

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 10
    You can run a trace using Profiler to watch the goings on, but in reality if you want to log all queries then you want to perform the logging in the sproc that performs the select.
    Home | Blog

  3. #3
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    profiler pfft. on a prod box directly is a major no-no. write a server side trace script. which you can produce from profiler. write your results to a file somewhere where you have lots of room. limit the scope of your trace to as few events and columns as possible.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  4. #4
    Join Date
    Feb 2004
    One Flump in One Place
    I use this for server side tracing:
    Automating Server Side Tracing in SQL Server : Narayana Vyas Kondreddi's home page

    I would not want to have traces running permanently though if that is your intention.
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Jun 2009
    CA, USA
    Even incase of server side trace make sure you use all the neccessary filters and don't capture the events you don't need to reduce the load on the server and make sure you use file rollover option.
    SQL Server MVP

Posting Permissions

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