Geeks With Blogs

AzamSharp Some day I will know everything. I hope that day never comes.
How many times have you seen this error? SQL SERVER DOES NOT EXIST OR ACCESS DENIED The cause of this error can be different in different cases here are two causes:
1)When specifying connection string please don’t surround server name with curly brackets like this (localhost).
2)Another cause can be Windows firewall which will prevent you from connecting to the database hosted on different server. Here is what you can do.

Start menu -> click on run and type -> wscui.cpl -> Select Exceptions -> Add port -> Enter Name: SQL SERVER Port Number 1433 Thanks to Jin for providing me with the second tip! Posted on Wednesday, July 27, 2005 12:11 PM | Back to top



Comments on this post: SQL Server Does not Exist or Access Denied

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
My problem is that I have 3 instances on the same sqlserver....

They all have the same configuration and service pack 4.

2 of them are connecting while the third one is not.....

It is giving me the sql error 17 in addition to the sql server does not exist or access denied.

Please note that I am able to access the sql server from its home server and I can connect to it using the ODBC,,,while i am not able to connect to it from other pcs using the odbc.

What could be the problem.???

Left by Joseph Abou Nader on Aug 17, 2005 1:00 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
hey I am having the same problem
I am getting error:-
could not start the MSSQL server on local machine
Left by sam on Aug 24, 2005 2:27 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
i m also geting the same error can u tell me what the reson should be , my windows firewall is closed.
and code i m firing is

Dim sqlConn As New SqlConnection("Server=DC;user id=sa;password=;database=NewProject")
Dim sqlAdapt As New SqlDataAdapter
Dim sqldataset As New DataSet
Dim sqlcomm As New SqlCommand
sqlcomm.Connection = sqlConn
sqlcomm.CommandType = CommandType.Text
sqlcomm.CommandText = "Select * from Agent "
sqlAdapt.SelectCommand = sqlcomm
sqlAdapt.Fill(sqldataset, "Agent")
DataGrid1.DataSource = sqlDataSet
DataGrid1.DataBind()
Left by ritu on Sep 20, 2005 2:42 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
i too having the same problem but not before the installation of our server. See everything worked fine until our Windows 2003 crashed after the installation of service pack. We went for a fresh installation of Windows 2003 server and now the IIS is not communicating with the SQL Server 2000 which is running on a seprerate Windows 2000 server. But my Windows XP IIS is well working on a ASP.NET page connecting with the same SQL Server.

i do not understand. I have checked everying like connection string and TCP client port addresse etc.,

can any one advise me.
Left by siraj on Oct 04, 2005 3:45 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Strange thing is that this happens to me in different settings:
I created a dll that uses the database. The connectionstring has been hardcoded for testing purposes within this dll.

When using the dll from a .Net winform application, all goes as planned
When using the dll from an ASP.Net application (local, on the same machine) it simply refuses with 'SQL Server does not exist or access denied.' error.

Any suggestions?
Left by Chrlatan on Oct 10, 2005 3:35 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
i am also getting the saem problem...please help me to come out of it...
Left by Nandan on Oct 10, 2005 10:48 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
I too faced a similar problem:

From ASP.Net, connection to local sqlserver works, but not to remote sqlserver. got the error "SQL Server does not exist or access denied".

But from winform client able to connect to remoter sqlserver.

The Solution that worked for me was:

In Web Site Properties, Directory Security Tab,

Anonymous access and authentication Control section, Click Edit.

Give an appropriate uselname account which has access to the server.

Left by SRV on Oct 19, 2005 1:34 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
i m geting same error SQL Server Does not Exist or Access Denied can u tell me what the reson should be , my windows firewall is closed.
and code i m firing is

Left by sreenuprasad on Nov 21, 2005 9:46 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
There is no single reason for the problem. Please read this thread and see if it solves your problem.
Left by AzamSharp on Nov 22, 2005 11:54 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Hi:

"SQL Server does not exist or access denied" - The error has two parts:
1. SQL Server does not exist - This might be the result of a firewall block as you had identified. Other things to check would your cliconfg.exe, svnetcn.exe, and see if your protocols are configured right.

2. Access Denied:
Check if the user making the request to SQL has privilges to access the SQL Objects that you are accessing.

HTH!
Left by Skanda Subramanian; Sunil Kumar on Dec 09, 2005 6:19 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Delete the following entry in the registry:
<ServerName>=<Value> in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo
Left by Lasitha on Jan 23, 2006 8:06 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Hi
I have just spent the last 2 hours trying to get around this problem. I looked at all the comments here (and elsewhere) and there are a lot of people getting this error. My issue was 15 users could connect as they did last Friday, but 3 users couldn't.
My fix was to use Named Pipes - this protocol is supported by default in SQL (check in Server Network Utility) and presto - all is OK. I used Named Pipes on the 3 clients that did not work.
It might not be the nicest, but it gets the clients up and working.
Hope it helps.

MKV
Left by MKV on Feb 19, 2006 2:29 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
HELLO EVERYBODY,

ADVACNE THANKS FOR HELPING ME,

I am trying to connect the MS-Sql server2000 remote server. But when i run the application in the local system, it works fine where in remote system it throws an exception stating "SQL server Does not exist or Access denied".

Regards,
Karthik
Left by Karthik on Apr 18, 2006 4:08 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
SQL Server Does not Exist or Access Denied
Left by Ramchandar Yadav on May 04, 2006 2:09 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
plz help me
Left by Ramchandar Yadav on May 04, 2006 2:11 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
See if this helps to solve the problem:
http://www.doughughes.net/index.cfm?event=viewEntry&entryId=91
Left by Dave on Jun 05, 2006 10:11 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Hi,

I am getting runtime error :
SQL Server Does not Exist or Access Denied .
Connection is established properly & server is also running(its on other m/c).

My code is :
SqlConnection con = new SqlConnection ("server=prashant-w2kp;database=MailDB;uid=sa;pwd="
SqlDataAdapter da =new SqlDataAdapter("select * from LoginDB",con);
ds=new DataSet();
da.Fill(ds,"LoginDB");

I didn't get the solution of this problem.
Kindly send reply!

Regards,
Prashant
Left by Prashant Ramdasi on Sep 11, 2006 11:06 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
I am getting runtime error :
SQL Server Does not Exist .
Connection is established properly & server is also running(its on other m/c).

My code is :
SqlConnection con = new SqlConnection ("server=localhost;database=pubs;uid=sa;pwd=";)
SqlDataAdapter da =new SqlDataAdapter("select * from authors",con);
ds=new DataSet();
da.Fill(ds);
DataGrid1.DataSource=ds;
DataGrid1.DataBind();

I didn't get the solution of this problem.
Kindly send reply!
Left by Roshan on Sep 22, 2006 10:33 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Hey everybody...my problem is same but little bit differ.

If i access project done by asp .net thru other pc then no error appears. but when i deploy this project and install to that pc....then i get that above error...SQL server doesnot exist...

Please help me..
Left by rajendra on Oct 10, 2006 2:09 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
i was facing the same problem, i got rectified by changing gateway settings

thanks
Left by Sanjeev on Jan 15, 2007 5:05 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Hi!

The MSDE security patch solved this thing for me

Thanks a lot!
Left by Xavier Alfeiran on Apr 04, 2007 4:00 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
SQL Server Does not Exist or Access Denied

SqlConneection conn=new SqlConnection(Server=localhost;uid=sa;pwd=;database=master);
conn.Open();

in the above mentioned code first line is executing properly but while attempting to open the connection i am getting the error Sql Server Does not exist or Access Denied.
Left by Natarajan on Apr 08, 2007 11:23 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Clearly explain the connection string which is easy to handle
Left by Jaser on Apr 10, 2007 12:15 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
ex. fail
Server=localhost;uid=sa;pwd=;database=master

ex. works
Server=localhost\SQLEXPRESS;uid=sa;pwd=;database=master
Left by Flemming on Jul 27, 2007 4:20 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
[Mircosoft]]ODBCSQLServer Driver][TCP/IP Sockets]Connection Open(Connect()) Connection Failed
Left by Nishanth.A on Aug 07, 2007 4:29 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
i had same problem but it cant work on local host also
Left by chetan on Aug 24, 2007 6:33 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Try the machine name instead of "localhost".
Left by Ozy on Sep 04, 2007 2:00 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Try starting the SQL server browser service
Left by ss on Sep 11, 2007 8:13 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
SQL Server Does not Exist or Access Denied

pls help me on this,i am wasting the time for more the n three days

if any one knows it pls give the soln

regards
rajesh
Left by rajesh on Oct 24, 2007 9:37 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Hi
I used the
SQL server surface configuration tool and selected using tcp/ip only for remote connections.
It works!
regards
Tyron
Left by tyron on Oct 31, 2007 2:12 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
i understand this is a pretty vague error message, but i can't seem to figure out the reason for it.

Attempting connection
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.

i have sql 2000 sp4 running on a windows 2003 R2 standard server (latest sp as well). my winXP clients cannot connect their ODBC connections. however, i have a windows 2000 server that can connect via its ODBC connections. all seems identically matched, only difference is the actual username logged on at each machine. i did try logging in with the same username and trying to connect from the winXP machine, without luck.

additionally, the SQL server name appears twice in my drop down list of servers to connect to in the ODBC configuration window.

does this help narrow my issue down at all?

any help, thanks!


Left by mcrudo on Nov 21, 2007 9:51 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
I am able to connect to sqlserver 2000 using asp.net 2.0 but unable to connect using asp.net 1.1 in same system
OS:windows xp professional ver 2000, service pack 2.0
i am using connection string

If DataSource = "local" Then

Return "Data Source=\\local;server=development;Initial Catalog=" & ConfigurationSettings.AppSettings("DC") & ";Integrated Security=SSPI"

i given setting in web config
Left by bharu on Jan 06, 2008 9:45 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
I have same problem. pls give correct and resonable solution for it.
Left by Hetal on Jan 23, 2008 9:24 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
I am able to connect to SQL server 2005 via a .Net 2.0 app but am unable to do so from .NET 1.1 code. The connection string in both projects is the same.
Since windows firewall is enabled, 1433 and 1434 ports are open. Only after these ports were opened, .Net 2.0 app starting working but still .Net 1.1 is not working.
I have tried to change the web.config by setting the <identity impersonate="true"/>.
Also I have also made sure that remote connections are enabled in the SQl Server and the web server and sql server are also on the same domain.
This is really killing my time and I am in a desperate need of solution. Please help.
Left by IB on Feb 15, 2008 5:27 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
The second tip which involves windows firewall settings worked for me. Thank you so much.
Left by jaja on Feb 25, 2008 12:40 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
After hours of trying various possible solutions, uninstalling antivirus software, uninstalling and reinstalling the database software, this hint from MKV finally did the job. THANK YOU!!

[Hi
I have just spent the last 2 hours trying to get around this problem. I looked at all the comments here (and elsewhere) and there are a lot of people getting this error. My issue was 15 users could connect as they did last Friday, but 3 users couldn't.
My fix was to use Named Pipes - this protocol is supported by default in SQL (check in Server Network Utility) and presto - all is OK. I used Named Pipes on the 3 clients that did not work.
It might not be the nicest, but it gets the clients up and working.
Hope it helps.

MKV]
Left by Cathy C on Mar 23, 2008 12:10 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Dear All
If you have solved the proble.m then please help to solve this problem.

I'm creating ODBC connection in Windows Vista for SQL Serverv2000
Left by Vivekanand on Apr 04, 2008 11:45 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Dear All,
If anyone got the solution related this error. when creating the ODBC connection in window Vista OS the server version is Windows 2003 where sql server2000 is installed.

Give detail....
Left by Vivekanand on Apr 10, 2008 1:07 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Hai All
I am using ASP.Net enterprise Manager,
I am getting the error "SQL Server Does not Exist or Access Denied " when i'm running locally.But it's working properly in our site.
Please help Me
Left by Niya on Apr 11, 2008 5:19 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
Will u give me solution for setting an alert message manually when the error comes "SQL Server Does not Exist or Access Denied ".
i am using asp and sql.
Left by lincy on Apr 24, 2008 12:40 AM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
I am able to connect to server by 'sa' password through client(query Analyser) but i am not able to connect through local server.
Please help me
Left by Sachin on May 01, 2008 9:41 PM

# re: SQL Server Does not Exist or Access Denied
Requesting Gravatar...
I am facing the same problem. More over I am not able to view my SQL Server name in any of the sql server list (drop down). Also I am VB programmer. I am using OLEDB connection to connect to SQL Server installed on windows server 2003 server. It is not connecting. I am getting the same error as stated above. I am confused..... plz help :-(
Left by lakshmi on Jun 12, 2008 6:15 PM

Your comment:
 (will show your gravatar)


Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net