Partilhar via


Troubleshooting: Timeout expired

The "Timeout expired" error commonly occurs when an instance of the Database Engine is not running, when the server name was typed incorrectly, or when there are network problems or firewalls.

Error Text

In SQL Server Management Studio this error appears as:

"Cannot connect to <servername>."

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server, Error: -2)"

From sqlcmd, possible timeout errors include:

"SQL Network Interfaces: Error Locating Server/Instance Specified"

"Sqlcmd: Error: Microsoft SQL Native Client : Client unable to establish connection."

"Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired."

"Could not open a connection to SQL Server"

"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections."

Typical Causes of This Error

Cause Resolution

Server name was typed incorrectly.

Try again with the correct server name.

The SQL Server service on the server is not running.

Start the instance of SQL Server Database Engine.

The TCP/IP port for the Database Engine instance is blocked by a firewall.

Configure the firewall to permit access to the Database Engine.

Database Engine is not listening on port 1433 because it has been changed, or because it is not the default instance, and the SQL Server Browser service is not running.

Either start the SQL Server Browser service, or connect specifying the TCP/IP port number.

The SQL Server Browser service is running but UDP port 1434 is blocked by a firewall.

Either configure the firewall to permit access to the UPD port 1434 on the server, or connect specifying the TCP/IP port number.

The client and server are not configured to use the same network protocol.

Using SQL Server Configuration Manager, confirm that both the server and the client computers have at least one enabled protocol in common.

The network cannot resolve the server name to an IP address. This can be tested using the PING program.

Fix the computer name resolution problem on your network or connect using the IP address of the server. This is not a SQL Server problem. For assistance, see your Windows documentation or your network administrator.

The network cannot connect using the IP address. This can be tested using the PING program.

Fix the TCP/IP problem on your network. This is not a SQL Server problem. For assistance, see your Windows documentation or your network administrator.

Unusual Errors

Connection attempts may fail when the current language is Turkish or Azeri and the server name contains "I". To avoid this problem, connect to the server using the IP Address. If "I" is in the instance name, specify the TCP/IP port number when connecting. To connect to a specific port, use an alias.

Note

To help troubleshoot connection issues, use the tutorial Getting Started with the Database Engine.

See Also

Tasks

How to: Create a Server Alias for Use by a Client (SQL Server Configuration Manager)
How to: Connect to the Database Engine Using sqlcmd.exe

Help and Information

Getting SQL Server 2005 Assistance