How to Fix :: OLE DB provider “SQLNCLI10” for linked server returned message “Query timeout expired”.

by default a remote query (Query using Linked Server) expires in 10 mins. We can find this value in SQL Server using below queries

 

sys config remote procedure

 

SELECT * FROM sys.sysconfigures
WHERE comment ='remote query timeout'

--or 

SELECT * FROM sys.configurations
WHERE name='remote query timeout (s)'

We can find more details in MS doc

http://msdn.microsoft.com/en-us/library/ms189631.aspx

in order to change it we have to sp_configure and we don’t need to restart the database engine

 

sp_configure 'remote query timeout',3600
go 
reconfigure with override 
go 

This will set the time out to 3600 seconds/ 1 hr

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s