SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Audit Database Changes in the Real World


Audit Database Changes in the Real World

Author
Message
Preet_S
Preet_S
Mr or Mrs. 500
Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)

Group: General Forum Members
Points: 572 Visits: 240
msbasssinger (6/11/2008)
Yes. I grabbed the wrong audit article. My bad, and my apologies.

Time to revist the coffee pot. Smile


No worries. Make me one too pls! Smile
yonision
yonision
SSC Veteran
SSC Veteran (243 reputation)SSC Veteran (243 reputation)SSC Veteran (243 reputation)SSC Veteran (243 reputation)SSC Veteran (243 reputation)SSC Veteran (243 reputation)SSC Veteran (243 reputation)SSC Veteran (243 reputation)

Group: General Forum Members
Points: 243 Visits: 164
for a simple solution (that's also Sarbanes-Oxley compatible)
check out:
http://www.nobhillsoft.com/Randolph.aspx



Nathan Allan
Nathan Allan
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 19
Note that naming stored procedures starting with "sp_" causes SQL Server to search master for the procedure first, causing cache misses and more expensive name resolution.
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)

Group: General Forum Members
Points: 43665 Visits: 14925
Nathan Allan (6/11/2008)
Note that naming stored procedures starting with "sp_" causes SQL Server to search master for the procedure first, causing cache misses and more expensive name resolution.


You should note that the author states that the procedures were originally placed in master and then moved to another database and that the author admits to "lazily" leaving the names "sp_".



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
don_goodman
don_goodman
SSC-Enthusiastic
SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)

Group: General Forum Members
Points: 150 Visits: 82
Why? You have C2 security enablement that does all the work for you to generate traces of everything. You have :fn_trace_gettable to read the traces so you don't have to leave QA or SMS.

Yours was pointless work.
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)SSC-Forever (43K reputation)

Group: General Forum Members
Points: 43665 Visits: 14925
don_goodman (6/11/2008)
Why? You have C2 security enablement that does all the work for you to generate traces of everything. You have :fn_trace_gettable to read the traces so you don't have to leave QA or SMS.

Yours was pointless work.


I think stating that someone's work is pointless is being a little harsh. Especially since C2 auditing is at the server level and audits everything on the server to a pre-determined location. The article outlines how to audit specific events in specific databases to a user-defined location. Why would I want record and then have to sift through every action on the server when all I really need to know about is activity in one database?

If you think C2 auditing is a better solution for this specific purpose outlined in the article then take the time to offer something constructive instead of denigrating the work done by others.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
tjaybelt
tjaybelt
SSC Eights!
SSC Eights! (967 reputation)SSC Eights! (967 reputation)SSC Eights! (967 reputation)SSC Eights! (967 reputation)SSC Eights! (967 reputation)SSC Eights! (967 reputation)SSC Eights! (967 reputation)SSC Eights! (967 reputation)

Group: General Forum Members
Points: 967 Visits: 470
Jack Corbett (6/11/2008)
don_goodman (6/11/2008)
Why? You have C2 security enablement that does all the work for you to generate traces of everything. You have :fn_trace_gettable to read the traces so you don't have to leave QA or SMS.

Yours was pointless work.


I think stating that someone's work is pointless is being a little harsh. Especially since C2 auditing is at the server level and audits everything on the server to a pre-determined location. The article outlines how to audit specific events in specific databases to a user-defined location. Why would I want record and then have to sift through every action on the server when all I really need to know about is activity in one database?

If you think C2 auditing is a better solution for this specific purpose outlined in the article then take the time to offer something constructive instead of denigrating the work done by others.


Thanks for the support Jack. I agree with what you said. I initially investigated C2 auditing as a solution, but found the level of auditing it was to perform, and some of the drawbacks associated with it too costly for what i wanted. So, this solution is a leaner version of auditing for specific events. With C2 auditing, when its enabled, if you turn off that trace, the default result is the sql server shuts down. The ability to bring down the prod server by stopping a trace was a high risk, with multiple people able to get in and inadvertantly do this. With the system i described, when its disabled, the prod server continues marching along just fine.

In the end, this is one way of solving a specific problem. There are always multiple ways to do tasks, and i hope that people will see some ideas from this that will help them out in their Auditing and Compliance needs.



Chad Crawford
 Chad Crawford
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4317 Visits: 18732
tjaybelt, this is way cool, thanks so much for being willing to share.

Do you know offhand the differences between using this method and replacing the trace files with a DDL trigger? I can think of two - interoperability with SQL 2K, and there are some events that you can't catch with a DDL trigger. I was looking at using DDL triggers to do some auditing, and if there is not too much functionality difference may replace the trace portion with a DDL trigger and take advantage of the central administration process you've built.

Thanks!
Chad
Donna Hawley-340938
Donna Hawley-340938
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 844
Thank you for your interesting article. I was working through it this afternoon, but I am missing a procedure "spGetDirExists". I that something that should have been included?
Steve Ebling
Steve Ebling
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 2585
Its really the same as the spGetFileExists. see the doc for the xp_fileexists stored procedure that it calls. One of the columns in the result set indicates if the 'file' is a directory.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search