最佳解答者
MS SQL 2000 "timeout expiried"

問題
-
Hi,
I have a stored procedure which run as a scheduled job every night.
Recently, the schedule job return run failure and returned "timeout expiried" error message.
I have set the command timeout to 1200s and the stored procedure will run about 10000 records.
The stored procedure mainly join tables and update other tables without any transaction lock.
Do anyone can help me??
Thank You Very Much.
解答
-
homeendd wrote: what is the different between N'remote query timeout and the command timeout?
Remote Query is when your query is executing in that server but also having external connection to call remote execution to remote connected server.
Command one means those commands which is executing in local SQL Server.
所有回覆
-
Hi
have you tried to re-implement the stored procedure to see if you could improve the performance, so that it can complete before timeout? (to avoid timeout)
Can you set the command timeout to 0 or longer to avoid the time out error? (I am sorry to tell you that I do not know if you can change the timeout to be unlimited time)
Another though is: If you have any table that you are going to update it in use/ opened? It may cause timeout/ take very long time to update. (It happened to me before)
Please correct me if I am wrong.
Many thanks -
Thanks for your reply
Do you have any methods/tools to check if the table is opened?
Also, I have one more question.
We can configure the remote query timeout with "exec sp_configure N' exec N'remote query timeout (s), 1000" command.
How to use it? And what is the different between N'remote query timeout and the command timeout?
Thank you very much!
-
homeendd wrote: what is the different between N'remote query timeout and the command timeout?
Remote Query is when your query is executing in that server but also having external connection to call remote execution to remote connected server.
Command one means those commands which is executing in local SQL Server.