April 16, 2009 at 2:41 pm
Hi All,
I have a third party application (a form) which is used to enter data into the database. I want to know what tables are affected when a user enters data in the application form and when he clicks submit, that application inserts the data into the database.
My environment is SQL 2k5 with SP2.
The application is developed by a third party and no source code is provided or SQL query is provided that is used by the application (forms) when the user enters the data.
Can I use profiler to see the SQL statements ? I know that running a profiler will generate extra load on the prod server.
Is there any option to know the SQL code (insert statements) generated by the application that inserts the data into the database.
The REASON I want to know is that when a user enters some data in the form and submitting the data will inturn be inserted in the database, I want to export that tables wherein the insert has happened to our test server, so that both the database - prod and test - will be in sink !!! by knowing the SQL qurey, I can figure out the affected tables and do an export of data to the test server as I want to avoid database restore everytime (this is indeed not a good idea to do a restore everytime u r data is changed)
Thanks to all in advance,
\\K
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
April 16, 2009 at 2:47 pm
Yes, profile cna capture this information for you. That said, I am not sure that it is the best tool for what you are actually trying to do.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 17, 2009 at 7:03 am
What about using replication?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
April 17, 2009 at 7:35 am
Jack Corbett (4/17/2009)
What about using replication?
Hi Jack,
Replication came to my mind first. But when I analyzed my situation, it is not a good solution to implement.
In my situation, the user directly key-in into the production database and then I have to sink those tables that are updated with the test. So if user make a typo error, then that is directly reflected in the test. As a precaution, I have a script that can be used to undo the inserts done by the user, so if the user makes a mistake, I can undo it !!
I know that it is not a good idea to directly key-in the data in the production but this is what it is required in my situation.
The thing is that I want to know the SQL behind the application that is inserting data in the production and knowing the SQL I can know the tables affected and by using an import export wizard, I can export the data from the tables in the test. This way I can sink both test and prod.
Is there any way to know the SQL generated by application. I am going to use profiler to see what I can get.
Can you suggest what specific filters can I use in profiler to capture the SQL ?
Thanks,
\\K
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply