Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: capture and...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 6 Topic 10998 of 11517
Post > Topic >>

Re: capture and save running sql query to database table (for logging)

by "Plamen Ratchev" <Plamen@[EMAIL PROTECTED] > Apr 25, 2008 at 08:59 AM

It is good to note here that DBCC INPUTBUFFER requires the user executing
to 
be member of the sysadmin fixed server role. One way to handle this is to 
specify user or login with sufficient privileges in EXEC (you can use EXEC

AS LOGIN or USER:

INSERT INTO SQLLog (language_event, parameters, event_info)
EXEC('DBCC INPUTBUFFER(@[EMAIL PROTECTED]
);') AS LOGIN = 'admin_login';

HTH,

Plamen Ratchev
http://www.SQLStudio.com
 




 6 Posts in Topic:
capture and save running sql query to database table (for loggin
=?ISO-8859-1?Q?Gear=F3id?  2008-04-24 02:12:29 
Re: capture and save running sql query to database table (for lo
"Plamen Ratchev"  2008-04-24 09:30:54 
Re: capture and save running sql query to database table (for
=?ISO-8859-1?Q?Gear=F3id?  2008-04-24 08:14:56 
Re: capture and save running sql query to database table (for lo
"Plamen Ratchev"  2008-04-24 22:34:49 
Re: capture and save running sql query to database table (for lo
"Plamen Ratchev"  2008-04-25 08:59:27 
Re: capture and save running sql query to database table (for
=?ISO-8859-1?Q?Gear=F3id?  2008-05-15 02:49:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 1:16:56 CST 2008.