News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brian Swan's Blog:
Working Down the Stack Enabling ODBC Tracing with the SQL Server Driver for PHP
April 14, 2010 @ 10:16:40

In his continuing series looking at using the SQL Server driver in PHP applications, Brian Swan has posted a new tutorial looking at enabling ODBC tracing in your SQL Server-driven PHP application.

The short story [of the backup issue] is that a query I was executing from PHP seemed to execute successfully (no errors were returned), but the results of the query were not what I expected. When I executed the same query from SQL Server Management Studio (SSMS), the query executed successfully and I got the results I expected. What was going on?

To try to figure out what was going on he needed to get down to the SNAC/ODBC level and trace the process as it went through. By enabling the "TraceOn" and "TraceFile" parameters in the connection's options, you can get a wealth of information returned along with the normal data. He includes some of the trace information to give you an idea of what he was looking at to solve his problem. In the end, the tracing helped him see more what was working than not and discovered a possible bug in the ODBC drivers that could be causing it to hang in a "restoring" state on the "RESTORE DATABASE" call.

0 comments voice your opinion now!
tracing debug sqlserver driver odbc


blog comments powered by Disqus

Similar Posts

Matthew Turland's Blog: PHP 5.2 and SQL Server 2000 on Windows XP

Symfony Blog: FireSymfony - Debugging symfony applications inside Firebug

Pierre-Alain Joye's Blog: How to generate backtraces on windows without compiler

Sameer Borate's Blog: Importance of logging in web development

Internet Super Hero Blog: MySQL native driver for PHP: mysqlnd-5.0.1-beta available


Community Events





Don't see your event here?
Let us know!


conference voicesoftheelephpant framework introduction developer podcast release api bugfix deployment community tips series zendserver interview language list library symfony laravel

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework