November 16, 2007 at 2:28 pm
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
November 16, 2007 at 3:40 pm
On the sql server in program files > sql server there is a program called profiler. This will show all incoming commands.
November 18, 2007 at 6:43 am
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
November 18, 2007 at 9:48 am
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.
November 19, 2007 at 7:39 am
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"
November 19, 2007 at 8:32 am
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.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy