Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Kiani
Starting Member
4 Posts |
Posted - 2008-01-09 : 00:17:07
|
Hello,I want to create a trigger on some system tables such as sysdepends that when any changes on relations happend then a record include username,machine name,Appname and so on be inserted to a user table, because I want to manage my databases for changing the relations,indexes and so on by some persons or applications that I do'nt know who is changing them.Can anyone answer me?Thanks |
|
mcrowley
Aged Yak Warrior
771 Posts |
Posted - 2008-01-09 : 10:41:05
|
It is generally a bad idea to modify system tables, as it could invalidate any support you would get from Microsoft. In fact, I am not sure the system even allows you to add triggers to the system tables.best bet is to restrict permissions on the production databases, so the users can modify data and such, but have no rights to run DDL scripts. This will take some political wrangling, but can be done. If there are third party applications that need DBO access to do some "black magic" in the database, keep their logins separated from everyone else. |
 |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2008-01-09 : 12:10:07
|
or, upgrade to 2005 and write a DDL trigger.  elsasoft.org |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-01-09 : 23:34:53
|
You can't create trigger on system tables. |
 |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2008-01-10 : 00:30:06
|
May want to have a look at Lumigent AuditDB (a tool rmiao pointed me to a few yrs ago) :)or ApexSQL, but I'll say Lumigent is far better. |
 |
|
|
|
|
|
|