Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can enable ODBC Tracing from the ODBC Data Source Administrator (odbcad32.exe). The log file it generates is rather cryptic but it will provide you with the SQL statements run by the logged in user on that machine. There is also a checkbox labeled "Machine-Wide tracing for all user identities" for logging all SQL statements run by any user - including services - on that machine.</p> <p>Logging may not start until you disconnect and reconnect to the SQL server. So, it is a good idea to restart whatever programs/services connect to your SQL Server. This is especially important if you have connection pooling enabled, which will keep connections open even if the program, in question, has disconnected.</p> <p>Also, there are two versions of the ODBC Data Source Administrator on Windows 64bit, one for 32bit and the other for 64bit. So, you will need to enable logging for the appropriate bitness of the program you are tracing.</p> <ul> <li><a href="http://support.microsoft.com/kb/274551" rel="nofollow noreferrer">How To Generate an ODBC Trace with ODBC Data Source Administrator</a></li> <li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms711020%28v=vs.85%29.aspx" rel="nofollow noreferrer">Setting Tracing Options</a></li> <li><a href="http://blogs.msdn.com/b/farukcelik/archive/2008/10/17/why-my-32-bit-applications-cannot-see-the-odbc-dsns-that-i-created-on-my-64-bit-machine.aspx" rel="nofollow noreferrer">Why my 32 bit applications cannot see the ODBC DSNs that I created on my 64 bit machine ?</a></li> <li><a href="http://support.microsoft.com/kb/942976" rel="nofollow noreferrer">ODBC Administrator tool displays both the 32-bit and the 64-bit user DSNs in a 64-bit version of Windows</a></li> </ul> <p><strong>Update</strong>: Another option for you would be to use a tool like <a href="http://www.wireshark.org/" rel="nofollow noreferrer">Wireshark</a>. Since it has the ability to sit at the network driver level, it can intercept all your network traffic - including but not limited to SQL. These are known as <a href="http://en.wikipedia.org/wiki/Tabular_Data_Stream" rel="nofollow noreferrer">TDS packets</a> - a standard that is used by <a href="http://en.wikipedia.org/wiki/Sybase_SQL_Server" rel="nofollow noreferrer">Sybase SQL Server (ASE)</a>, <a href="http://microsoft.com/sql" rel="nofollow noreferrer">Microsoft SQL Server</a> and <a href="http://freetds.schemamania.org/" rel="nofollow noreferrer">FreeTDS</a> ( w/ <a href="http://www.unixodbc.org/" rel="nofollow noreferrer">UnixODBC</a>).</p> <ul> <li><a href="https://www.youtube.com/watch?v=fY9S72FJbmE" rel="nofollow noreferrer">RPR NA03: Analysing SQL Server performance using Wireshark and Excel</a></li> <li><a href="https://stackoverflow.com/questions/2562682/how-do-i-filter-sql-server-traffic-between-app-and-db-servers-using-wireshark">How do I filter SQL Server traffic between app and DB servers using Wireshark?</a></li> <li><a href="https://stackoverflow.com/questions/2023589/how-can-i-decode-sql-server-traffic-with-wireshark">How can I decode SQL Server traffic with wireshark?</a></li> <li><a href="http://www.mssqltips.com/sqlservertip/2436/what-does-my-sql-server-data-look-like-over-the-wire/" rel="nofollow noreferrer">What does my SQL Server data look like over the wire?</a></li> <li><a href="https://www.google.com/search?q=wireshare%20sql" rel="nofollow noreferrer">Google Search for "Wireshark+SQL"</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload