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 |
DBADave
Constraint Violating Yak Guru
366 Posts |
Posted - 2006-04-19 : 12:31:45
|
Is it possible to create an alert that would run when a statement has been executed such as:CREATE DATABASECREATE PROCEDURECREATE TABLECREATE VIEWBACKUP DATABASEBACKUP LOG I want to audit when these commands are executed, but I don't want to do this through profiler, unless you feel the overhead would not be noticeable. Thanks, Dave |
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2006-04-20 : 04:49:01
|
DDL triggers would take care of this in SQL Server 2005. Apart from that, I can't think of an alternative to using the profiler. You could just restrict permissions - problem solved! Mark |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-04-20 : 08:49:28
|
We put an EXEC statement at the top of all our scripts which records the mnemonic name of the script, version number and "today's date" in a Log table. Thus we know what scripts have been run.Each SProc is in a separate file (with the execute to Sproc to log it at the top), so whenever a script is run it logs itself.Clearly it requires the discipline to put the Log Exec SProc in every script, so I dunno if that would do for you?Kristen |
 |
|
|
|
|