read statements

  • Hello,

    don´t know if i am right here. i have the following problem. i´m using a program which works with sql server 2000 database. is it possible to read out the sql statements this programms sends to sql server if i do something specific, eg create a custommer account or creating an invoice?

    background is i need to know the commands the program executes when i click on a button, which corrects the amount of material on stock. because i have to do this for about 15.000 times i want to know, which commands are executed so i can do it in once ...

    thanks for your help

    greeting w.meibers

  • On the sql server in program files > sql server there is a program called profiler. This will show all incoming commands.



    Nuke the site from orbit, its the only way to be sure... :w00t:

  • hello,

    thanks for the answer. there i looked before. the only i see there is:

    Audit Login

    SQLTransaction

    SQLTransaction

    RPC:Completed

    -> exec sp_primary_keys_rowset N'Lagerort', NULL

    Audit Logout

    I think that the statements i nedd ar in these SQLTransactions. Can i look into these ?

    Greeting

    wolfgang

  • This should log all activity while profiler is running. Make sure you are starting the profiler trace and then running the actions in your application.



    Nuke the site from orbit, its the only way to be sure... :w00t:

  • Gotten from someone who is smarter than I am and generously posted this to SQL Server Central

    Run sp_who2 to obtain the user's SPID value

    Then run DBCC INPUTBUFFER(55) -- in this case the spid value is 55

    Example of output in EventInfo column:

    "SELECT entry, description from logentries ORDER BY Entry"

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • You will only be able to see current processes with this. If you setup a trace you will capture all the events from start to the finish of the trace.



    Nuke the site from orbit, its the only way to be sure... :w00t:

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

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