June 15, 2018 at 11:42 am
I'm running a script locally in Powershell that loops bcp, copying hundreds of excel files to a database on Azure (I simply entered the network information as arguments to bcp). On each execution of the loop, I also make a query that updates a column of the table. At the beginning, it works fine. But about a minute in, it slows to a halt and finally produces this error.
47680 rows copied.Network packet size (bytes): 4096Clock Time (ms.) Total : 18250 Average : (2612.60 rows per sec.)Exception calling "ExecuteReader" with "0" argument(s): "Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
I'm not sure what's going on here. Here's the query it's timing out on:
$query = "UPDATE $tableName SET jobID = $dir_id where jobID is NULL;"$sqlCmd3 = $connection.CreateCommand()$sqlCmd3.Connection = $connection$sqlCmd3.CommandText = $query$sqlCmd3.ExecuteReader() *>$null$query = "UPDATE $tableName SET jobID = $dir_id where jobID is NULL;"$sqlCmd3 = $connection.CreateCommand()$sqlCmd3.Connection = $connection$sqlCmd3.CommandText = $query$sqlCmd3.ExecuteReader() *>$null
June 15, 2018 at 12:47 pm
jared429 - Friday, June 15, 2018 11:42 AMI'm running a script locally in Powershell that loops bcp, copying hundreds of excel files to a database on Azure (I simply entered the network information as arguments to bcp). On each execution of the loop, I also make a query that updates a column of the table. At the beginning, it works fine. But about a minute in, it slows to a halt and finally produces this error.
47680 rows copied.Network packet size (bytes): 4096Clock Time (ms.) Total : 18250 Average : (2612.60 rows per sec.)Exception calling "ExecuteReader" with "0" argument(s): "Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
I'm not sure what's going on here. Here's the query it's timing out on:
$query = "UPDATE $tableName SET jobID = $dir_id where jobID is NULL;"$sqlCmd3 = $connection.CreateCommand()$sqlCmd3.Connection = $connection$sqlCmd3.CommandText = $query$sqlCmd3.ExecuteReader() *>$null$query = "UPDATE $tableName SET jobID = $dir_id where jobID is NULL;"$sqlCmd3 = $connection.CreateCommand()$sqlCmd3.Connection = $connection$sqlCmd3.CommandText = $query$sqlCmd3.ExecuteReader() *>$null
The default command timeout is 30 seconds. Try setting the command timeout property to 0.
Sue
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply