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 |
GOPI
Starting Member
6 Posts |
Posted - 2006-07-20 : 09:56:50
|
Hi Team,1) Is there a way by which one can audit query statement containing the text "Alter database.......". I don't want to audit anything else but only this kind of statement. (Third party tools are not welcome. Sorry. C2 auditing is not the option for us. )2) Is there a way I can write a trigger on the system table view.Please help. I appreciate it and Thanks in advance. Thanks to this Community and sponsers.Best regardsGopi |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-07-20 : 09:59:57
|
>> 2) Is there a way I can write a trigger on the system table view.noYou can use the profiler to capture the commands.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
GOPI
Starting Member
6 Posts |
Posted - 2006-07-20 : 10:04:28
|
Thanks nr. Is there a way I can write a trigger to catch the statements in an efficient way? Hope this won't cause performance problems. I can't turn on the profiler due to performance issues. Thanks again nr |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-07-20 : 21:58:22
|
triggers can only capture insert,update, delete statementsyou will need to put up some version control process to prevent 'unauthorized' alter statements--------------------keeping it simple... |
 |
|
GOPI
Starting Member
6 Posts |
Posted - 2006-07-21 : 04:00:09
|
Thanks Jen. |
 |
|
Westley
Posting Yak Master
229 Posts |
Posted - 2006-07-24 : 03:26:53
|
Or you can try to have a server-side trace running on the server, which the performance impact are smaller, and load those data to a table every few hrs or daily and do your report base on that?we do have that on our server and we do not have any performance issues. |
 |
|
|
|
|