I'm running a php script from the command line against SQL server 2005 using the MS driver for PHP and getting time outs. The query takes about 2 minutes from SQL Server Management Studio and returns > 300,000 rows.
There are multiple queries in the script and for each one I do a sqlsrv_connect()
, execute the query and then sqlsrv_free_stmt()
and sqlsrv_close()
Output from sqlsrv_errors():
Array
(
[0] => Array
(
[0] => 08S01
[SQLSTATE] => 08S01
[1] => 258
[code] => 258
[2] => [Microsoft][SQL Native Client]Shared Memory Provider: Timeout error [258].
[message] => [Microsoft][SQL Native Client]Shared Memory Provider: Timeout error [258].
)
[1] => Array
(
[0] => 08S01
[SQLSTATE] => 08S01
[1] => 258
[code] => 258
[2] => [Microsoft][SQL Native Client]Communication link failure
[message] => [Microsoft][SQL Native Client]Communication link failure
)
[2] => Array
(
[0] => 08S01
[SQLSTATE] => 08S01
[1] => 0
[code] => 0
[2] => [Microsoft][SQL Native Client]Communication link failure
[message] => [Microsoft][SQL Native Client]Communication link failure
)
)