Error: Unable to connect to the Database. A network-related or instance-specific error occurred while establishing a connection to SQL Server.


Error: Unable to connect to the Database.

Description: While trying or establishing a database connection and the connectivity to the database is not configured properly then this error occurs. More exception details as followed.

Exception Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified) (-1)

Solution:

  1. Check whether TCP/IP in SQL Server Configuration is enabled or not.
  2. Ping the server name from command prompt. If no reply from server, then network connection to the server should be configured or enabled.
  3. Using Telnet command, we can check the port is opened or not, if not open the port.
  4. Check whether firewall is blocking the server port.
  5. Check any antivirus is blocking the server.
  6. Check the database name, user name and password using is correct or not.
  7. Check the required SQL Services (SQL Server Browser etc) account are running or not.
  8. Check your LAN network having connectivity issues.
  9. Use port number along with data source. e.g server name/server name, port number.
  10. Try creating alias in SQL Server Configuration.
  11. Try to connect the database through Visual Studio.
  12. Try using Database Server IP address as Server Name with or without port number.

How-to-Generate-or-find-Connection-String-from-Visual-Studio

Advertisements

2 thoughts on “Error: Unable to connect to the Database. A network-related or instance-specific error occurred while establishing a connection to SQL Server.

  1. Pingback: How To Fix Steam Error Unable To Connect To Network in Windows

  2. Pingback: How To Fix Ovh Error Establishing A Database Connection in Windows

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s