Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Trace - Profiler 1

Status
Not open for further replies.

sendba

Programmer
Sep 7, 2005
113
US
All,

I have to trace all the activities done by an user.
But when I run the trace the following informations are also captured. I need only the insert / update / delete/ DDL and DML operations.

Can someone please let me know how to eliminate these messges in trace.

set quoted_identifier off
SET TEXTSIZE 64512
select @@microsoftversion
SELECT ISNULL(SUSER_SNAME(), SUSER_NAME())
select name from master.dbo.spt_values where type = 'E' and name in ('OS/2','WINDOWS/NT') and (@@version like '%Microsoft%' or ((@@version like '% 1993 %' or @@version like '% 1992 %') and @@version not like '%Sybase%'))
set quoted_identifier off
SET TEXTSIZE 64512
select @@microsoftversion
SELECT ISNULL(SUSER_SNAME(), SUSER_NAME())
select @@spid
set showplan_text off


Thanks

Sen
 
SQL Profiler will capture all DDL and DML statements. You can add a filter to the text field which looks for commands which have the words INSERT, UPDATE or DELETE in it.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top