Triggers

Tags:
SQL Server
I was a cobol/db2 programmer for many, many, many years, and I now have the opportunity to work with SQL Server. That’s the good news…the bad news is NO training. I will have to learn this on my own. Do anyone have any suggestion on how to get started. My first project is to identify all of the tables on SQL Server 2000 and 2005 that are not being used. My manger wants me to create a trigger that will update a table with the userid, data, sql statement. I know that the trigger command will work for update, insert and deletes. But what can I use for Reads? Any Ideas?
ASKED: September 14, 2007  1:36 PM
UPDATED: February 22, 2008  4:59 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

There is no way to write a trigger which will fire when reads are done. You can create a trace using SQL Profiler which will log all of the commands which are executed. You can have all this logged to a table, and then parse the field with the actuall command (called text) to get the table name(s).

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following