question

Mandar Alawani avatar image
Mandar Alawani asked

Job failure due to error - [SQL Native Client]Unable to complete login process due to delay in opening server connection

Hi , We have server with two SQL Server 2005 Instances. Jobs on these instances often fail due to error as below: **[SQL Native Client]Unable to complete login process due to delay in opening server connection.** These jobs are mostly backup and DBCC jobs. Jobs run from AUTOSYS scheduler and usually run the command in the format as below: *Command: osql -E -S [SQLInstancename] -Q "DBCC checkdb ('DatabaseName')" -b* Also the job failures are too random in nature. The same job which fails one day will succeed the next day. I have checked the connectivity and permissions for the logins used, all is fine. Can someone pls help? Thanks in advance, Mandar
sql-server-2005loginjobconnectionfailure
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Usman Butt avatar image
Usman Butt answered
Seems like the load on the server could be delaying the connectivity. Try to increase the login timeout by using `osql **-l**` option. The default login timeout for osql is 8 seconds.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mandar Alawani avatar image Mandar Alawani commented ·
Hi Usman, Thanks for the suggestion. So, if I understand correctly..I need to change the Command for all related jobs to include the login-timeout option like below: For example, I want to set the login timeout at 60 seconds.. osql -E -S [SQLInstancename] -Q "DBCC checkdb ('DatabaseName')" -b -l 60 OR Can I set a common login timeout for OSQL on the target SQL instance? Thanks, Mandar
0 Likes 0 ·
Usman Butt avatar image Usman Butt commented ·
That is for the osql utility itself. Your understanding is correct. AFAIK, it is a value assigned at run-time, so cannot be configured. Generally, on Server side, the "Remote query timeout" is looked into, which is around 600 seconds in normal cases.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.