One reason that this message may occur is that the value for a remote query timeout in the local server is set in an invalid range for the underlying provider. SQL Server allows you to use values that range between 0 - 2147483647 for a remote query timeout.
When you run this code:
sp_configure 'remote query timeout'
This error occurs:
The default value for the remote query timeout is 0.
Collapse this tableExpand this table
Name | Minimum | Maximum | Config_value | Run_value |
---|
remote query timeout (s) | 0 | 2147483647 | 0 | 0 |
The SQL Server OLE DB provider (SQLOLEDB) has the maximum query timeout value defined as 0xfffe, which is 65534. When the remote query timeout is set to anything higher than 65534, SQL Server tries to set the
DBPROP_
COMMANDTIMEOUT to the specified value that happens to be greater than the allowed limit of 65534 in the SQLOLEDB provider, which then causes the error message to occur.