July 13, 2010 at 11:48 pm
Hi,
I am running one application and I am populating one database lets say test Database
I want to know that how are the database operations are going on like inserts, updates, etc.
Please help me in this regard.
Thanks in advance.
Santohs
July 14, 2010 at 12:09 am
You can trace the queries via SQL Profiler.
If you want to audit DML operations (INSERT/UPDATE/DELETE), then you should look into auditing with triggers.
Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
Ramblings of a DBA (My SQL Server Blog)[/url]
Subscribe to my blog
July 14, 2010 at 12:16 am
Can you please explain how to do auding with triggers.
Can you please send me the sample if possible.
So that I can do in similar lines
July 14, 2010 at 12:18 am
There's tons of articles on it: http://www.google.com/search?rlz=1C1GPMD_enUS313US313&sourceid=chrome&ie=UTF-8&q=sql+server+audit+triggers
Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
Ramblings of a DBA (My SQL Server Blog)[/url]
Subscribe to my blog
July 14, 2010 at 6:09 am
Auditing is a way of tracking the changes in data over time. If all you're interested in is seeing activity and performance, I'd stick with using Profiler and server-side trace.
Also, with SQL Server 2008, there are some very good ways to audit that don't involve triggers. You could look into Change Data Capture for example.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 15, 2010 at 2:52 pm
Grant, small correction, CDC is not exactly an audit tool, CDC only captures data changes (which might be what this person is looking for). An audit means one has to know who logged in and did the changes and when, CDC does not provide that. For audit one has to use the SQL Server Audit capability which tells who logged in and when and ran which command. It does not give you data though. Am not sure if there are people who use both in sync.
Thanks.
July 16, 2010 at 5:23 am
True. Auditing is the complete package, sorry for being unclear. I still shy away from triggers though.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 16, 2010 at 7:32 am
Yes me too, although in older versions of SQL Server it is not much of an option. It is strongly related to what the person needs, is it data log or to audit who logged in and out and did what. For the second one there are also 3rd party tools like Guardium SQL Secure. We have been using Guardium and are very happy with it.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply