2

I have MS SQL Server 2008 installed on PC as Main Server and clients are connected with this server and executing queries like inserting, updating, deleting.

I have noticed that some times when executing UPDATE query, no data saved in my database in the server where MS SQL Server is installed.

I'm using Winform Application with Entity Framework.

xBindingSource.EndEdit();
context.SaveChanges();

Is there any way to check if queries are executed successfully on server over network??

Thank you

Saleh
  • 2,657
  • 12
  • 46
  • 73
  • Query may well have executed correctly, but may not actually have updated anything. If there was an error in the query execution, you would have got an exception raised by the entity framework. – Paddy Jan 22 '13 at 14:57

4 Answers4

2

Run the profiler included in sql server.

1

you can use SQL Server Profiler in conjunction with Fiddler.

You can check the queries executed in SQL server using SQL server profiler. By using Fiddler you can check whether any requests have been made to SQL server.

daryal
  • 14,643
  • 4
  • 38
  • 54
  • If the OP is using WinForms and connecting to an SQL server directly, then I doubt that Fiddler will help, as there is no HTTP traffic between the WinForm client and the Sql Server. – Ralph Shillington Jan 22 '13 at 15:55
  • 1
    you are right, I assume that he is developing a web app; then he may go with WireShark (http://stackoverflow.com/questions/2562682/how-do-i-filter-sql-server-traffic-between-app-and-db-servers-using-wireshark) – daryal Jan 22 '13 at 16:04
  • 1
    "By using Fiddler you can check whether any requests have been made to SQL server." Explain how this is the case. – Timothy Gonzalez Jan 26 '17 at 16:21
0

I've used Miniprofiler. This answer says that it does not have to be a web application to use it.

Community
  • 1
  • 1
Srikanth Venugopalan
  • 9,011
  • 3
  • 36
  • 76
0

You can simply use Microsoft SQL Server Profiler to check if the query has been received by SQL Server and if yes you can see it's content. The profiler has many events that you can use depending on your needs. Typically you can use the Batch Starting and Batch completed events. The difference is that if there is an error in the batch, then you can at least see the batch starting. If you just want to know if SQL Server has received the request the profiler is all you need.

Raz
  • 1
  • 2