Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, I'm using SQL Server 2005. I have implemented some SPs with the TRY..CATCH structure and each time that I have an error, I just log it into a dedicated LogError table. I would like to add in LogError a column containing the command that was used by the user (containing the Procedure Name and the calling parameters) Is there any way to perform it ? Thanks PFI
Post Follow-up to this messagehave a look at http://www.nigelrivett.net/SQLAdmin/sp_nrInfo.html The bits with dbcc inputbuffer and fn_get_sql Get the sql executed if it is available. dbcc inputbuffer is more likely to have the user command. Neither is guaranteed. www.nigelrivett.net *** Sent via Developersdex http://www.droptable.com ***
Post Follow-up to this messageThanks a lot. dbcc inputbuffer was exactly what I was looking for. PFI nigelrivett a =E9crit : > have a look at > http://www.nigelrivett.net/SQLAdmin/sp_nrInfo.html > > The bits with > dbcc inputbuffer > and > fn_get_sql > > Get the sql executed if it is available. > dbcc inputbuffer is more likely to have the user command. > > Neither is guaranteed. > > www.nigelrivett.net >=20 >=20 > *** Sent via Developersdex http://www.droptable.com ***
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread