Solved

Capture add/update record on SQL 2005 table

Posted on 2008-10-28
6
283 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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 500 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

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
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 video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

737 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