?
Solved

Capture add/update record on SQL 2005 table

Posted on 2008-10-28
6
Medium Priority
?
289 Views
Last Modified: 2013-12-07
Any idea how to capture those "UPDATE" or "ADD" SQL statement under SQL Server Profiler, which event should I look for ?

I have selected the event " SQL:StmtStarting" but couldn't locate any UPDATE or ADD SQL when I create or delete a record in my ERP Application.

Thanks
0
Comment
Question by:AXISHK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 22828479
Look for SQL:Batch Completed and RPC:Completed.
0
 

Author Comment

by:AXISHK
ID: 22828852
Will the event SQL:Batch Completed , RPC:Completed and SQL:StmtStarting" capture all the update / delete TSQL in SQL 2005 ?

The concern was I could see the remove of header table but couldn't see any SQL statement to remove the detail table ... Will there be a possible of some trigger that will delete the detail table automatically but couldn't log on SQL Profiler. Any way to vertify this ??

Thanks
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22830327
Sure....try it on a test machine and see if everything you think shoudl get captured does.
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:AXISHK
ID: 22831810
Is there a way to check all the triggers build on a particular table
0
 
LVL 60

Accepted Solution

by:
chapmandew earned 2000 total points
ID: 22831912
select tablename = object_name(parent_id), name from sys.triggers
0
 

Author Comment

by:AXISHK
ID: 22837540
Thanks

One last question, is it possible to also capture the statements executed inside the stored procedure ? I find the profiler could capture the statement like
  "exec J9120.dbo.zdp_pa132 'xxxxxx', 'xxxx".  

However, what is executed inside it couldn't be viewed unless I go to the actual stored procedure and take a look. Is there a way to also view those instruction within SQL profile ?

Many thanks

 
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question