Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server does not exist or access denied

Tags:

sql

sql-server

We are currently migrating servers (2005 to 2008) and our host backed up the SQL database and transferred it to the new server.

I have transferred the website files and changed the IP address in the connection string and the global.asa file.

So technically speaking we have a mirror image on the new server, but when I try to launch a page that connects to the SQL I get the following error.

SQL_Server_does_not_exist_or_access_denied.

like image 982
Darren Cook Avatar asked Jan 11 '11 13:01

Darren Cook


People also ask

How do you solve SQL Server does not exist or access denied?

Go to the SQL Server Enterprise Manager. Right click on the SQL Server instance and select Properties. In the General tab and Network Configuration window, make sure TCP/IP and Named Pipes are enabled. Restart the SQL Server service if you need to make these changes.

Could not open connection to the host on port 1433?

If the Telnet client returns an error when testing the connection on port 1433, the local firewall may be blocking connection to the MS-SQL server. Disable the firewall on the MS-SQL server temporarily to test if the firewall is blocking the connection.


1 Answers

I experienced this problem when connecting from Qt to Microsoft SQL Server 2014 running also on my computer ...

I used the following QODBC connection string:

db.setDatabaseName("Driver={SQL Server};Server=DESKTOP-F6T7JPD\\sql_Instance_Name;Database=master;Uid=sa;Pwd=your_pwd;");

I only suffered 2 issues:

  1. identifying what to use for Server, this must be the Server Name as configured on SQL server instance, this can be found by opening "MicrosoftSql2014 management Studio", then by looking at properties I found the name (DESKTOP-F6T7JPD\sql_Instance_Name)

  2. the second issue actually is that this name must be modified by adding another back slash \ between my PC name and the instance name so the name found on management studio will be like: PC_Name\Sql_Instance. Note the "\", ... this must be put as Pc_Name\\Sql_Instance.
    Note the \\ between PC name and Instance Name!

like image 158
Mohammad Kanan Avatar answered Oct 06 '22 04:10

Mohammad Kanan