SQL Server - DML Commands auditing against user database objects.

Asked By prathap chowdary on 22-Jun-12 08:27 AM
Earn up to 30 extra points for answering this tough question.
Hi,

This is Prathap...... Actually client requirement is
 '' They need auditing DML commands against user database objects."

here i am facing problem ..because our all production servers running with SQL Server 2008 standard edition.
so , in standard editions Auditing feature not supported.

And i have tried through SQL server profilers.......in profiler counters...there is Objects folder is there....in that there options is there : objects:created, objects:Altered, objects:Deleted.
so profilers giving spid's for the above profilers options.......

but how to find out sql query's for that particular spid's..........
in the above scenarion i have tried with below query :

select

* from sys.dm_exec_sessions as s

inner join sys.dm_exec_requests as req on s.session_id=req.session_id

cross apply sys.dm_exec_sql_text(req.sql_handle)

where



s.session_id=61



In the above query also have a problem......because if i am running 2 querys with this session id : 61 .....i am not getting all sql text for that spid.

Please any one help me........is there any another scenario's..........

Note : We are using SQL Server 2008 standard edition.

Regards,
Prathap.
Robbe Morris replied to prathap chowdary on 22-Jun-12 02:09 PM
I think you are after this sort of technique:

http://schottsql.blogspot.com/2010/02/ddl-schema-change-auditing-on-sql.html
help
Can you suggest me what tutorials or links or ebooks we have to reffer to improve knowledge on sql server as a 1+year experinced person. what i have to reffer as a 1+ experinced and sp generates record set or output parameter. SP can be used for ddl and dml statement while udf cannot be used for the same. What is the cursor in SQL server? Cursors are used to hold the data temporarily for processing for some logic. It
Can anyone say me something about DML with Example in Sql Server hi, DML DML is abbreviation of Data Manipulation Language . It is used to retrieve, store, modify, delete, insert
hi, please tell me the exact difference between DDL and DML commands. I need exact difference between delete, drop and truncate. I need the three types of inserting querry for inserting the records in to the table. thank you. Hi, DML DML is abbreviation of Data Manipulation Language . It is used to retrieve, store, modify, delete, insert that this operation will cause all DELETE triggers on the table to fire. For Ex:- SQL> SELECT COUNT(*) FROM emp; COUNT(*) - -- -- -- -- - 14 SQL> DELETE FROM emp WHERE job = 'CLERK'; 4 rows
hi friends plz tell me some clarificatrion in sql servr 1)What is the difference between Subqueries and Joins and cte in sql server? Which is better and Why? Give an example of each. i know basci know subquery means a query with in a query. cte means its scope of dml joins means we retriver more than two table. but i need which sistuvation we use
explain the differences between oracle and sql server SQL Server is MicroSoft Product Oracle is Multinational Company am not asking about the companies, sql server
Hi All, I need to convert Oracle SQL to SQL Server script. Does anybody know turtoials, web links or good tools to convert ORACLE to
what is the difference between sql server and oracle? Get the ppt of difference between sql and oracle http: / / nocoug.org / download / 2004-05 / BegSQL.ppt Hi, The difference between SQl Server and Oracle are as follows:- Oracle : • a better transaction system • packages • Cursor For Loops
What are the Differences in Sql server 2005 and Sql server 2008? hi In sql server 2005, There is no option to compress backup files, but in sql server 2008, there
HI FRIENDS, I HAVE SMALL DOUBTS IN SQL PLZ TELL ME THE ANSWERS IN THE BELOW QUESTIONS 1)WHAT IS MAGIC TABLE IN SQL SERVER? 2)WHAT IS ROW_NUMBER() IN SQL SERVER? 3)DIFFERENCE OF STOREDPROCEDURE AND FUNCTIONS? 4)WHAT IS MATERIALIZEVIEW IN SQL SERVER? 5)DIFFERENCE
hello frndz, i want the difference between sql server, my sql and oracle database. And tell me what are the other databases being in usage. 0