Tuesday, February 14, 2012

Database Level Triggers in SQL 2000? File Writing?

Hello,

Is there any ability to do database-level triggers in SQL 2000? I have a SQL 2000 database, and I was asked if we could create a trigger that whenever anyone touches the data in a database, to create an entry in an event log? If not, I have a main table I can put a trigger on; however, my question is how do you write to a file in a trigger as well?

Thanks.

No, you need to do it individually table by table.

The same in SQL 2005.

Also think how your 'log' table will look like as layout of all tables is different

|||

bmains:

s there any ability to do database-level triggers in SQL 2000?

I'm afraid the database level triggers are introduced in SQL 2005 only. So, you can't create a database level trigger in SQL 2000. See if below link can be useful.

http://www.microsoft.com/technet/security/prodtech/sqlserver/sql2kaud.mspx

Hope this will help.

No comments:

Post a Comment