Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Question regarding SQL Server 2005 query logging

Posted on 2009-04-09
5
Medium Priority
?
584 Views
Last Modified: 2012-05-06
Hey folks,

Bit of an SQL Server novice here, so I appreciate any help you can give me. Skip to the very end if you want a summary of the solution I'm looking for, otherwise feel free to read on for the full explanation.

Essentially, here's my situation: we have a third party windows application for processing customer orders (that come from our ecommerce platform) and this application utilizes an sql server 2005 express database, and we wrote our own application to parse a csv export of our ecommerce orders and insert it into this shipping application.

Here's the problem: the shipping application has a filter system to filter data, e.g., "show me all orders processed yesterday."  Well, the filters dont currently work; they simply show 0 results, even where results should be shown.. And I'm sure it's a record/possibly a foreign key constraint or some kind that just isn't being updated properly by our import app, because if you go into the shipping application and try to edit an order, and simply hit ok without making any changes of any kind, the order will then show up on the filter. So whatever query is firing via the third party shipping application when you hit "ok" on that order edit, is fixing the problem.

So what I'd like to do is find a way to write all sql server queries to a log, so that I can see what query is firing when I hit that "ok" button in the 3rd party ship app and fix the problem in our code where appropriate. I know how/where to do this in MySQL, but I'm not familiar with the option in sql server '05.


Short version: how do I turn on complete logging for all queries sent to sql server, and where do I view those logs at?

Thanks in advance.

0
Comment
Question by:jmoriarty
[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
5 Comments
 
LVL 11

Accepted Solution

by:
bmatumbura earned 800 total points
ID: 24105045
Use the SQL Profiler
0
 
LVL 11

Expert Comment

by:bmatumbura
ID: 24105065
0
 
LVL 31

Assisted Solution

by:RiteshShah
RiteshShah earned 400 total points
ID: 24105107
Yes, I agree with bmatumbura.

All I can think is, SQL Prifiler, you can use some free third party profiler tool with some advanced option also.

http://www.mssqltips.com/tip.asp?tip=1459

0
 

Assisted Solution

by:RicRDoh
RicRDoh earned 800 total points
ID: 24105597
Within SQL Profiler you can choose to just trap SQL statements being fired at the database. If you're not bothered what triggers or stored procedures are doing then you will just need to apply  the event SQL Batch completed and the column TextData.
You can also choose to save results to another table or a file.
0
 

Author Comment

by:jmoriarty
ID: 24179937
That did the trick. Thanks!
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

647 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