469,117 Members | 1,364 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,117 developers. It's quick & easy.

Age-old "SQL Server does not exist" error

Roy
Judging from the sheer number of posts on this topic, I'm sensing this
is a fairly common problem. Only problem is, I've tried just about
every recommendation in all the posts I've found thus far and none have
worked.

I have XP on my workstation and two servers that run server 2003.
I have sql server dev edition on all 3, but only VS.NET on my
workstation.
I have .NET framework 1.1 on all 3 machines.

I can connect/interact just fine with the SQL Server instances on both
servers using EM, Query Analyzer, and VS.NET "server explorer."
However, pages I make on my workstation that connect to SQL Server on
either of the two servers fail to work. If I take the EXACT same pages
and run them on either server, they work fine.

The error I get is "Exception Details:
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied." I strongly suspect that this is a security issue, but I don't
know how to resolve it. I've given (as per other posts) the usernames
ASPNET and NETWORK SECURITY broad rights on all sql server instances,
yet still I can't run a webpage on my workstation that connects. It's
infuriating. Help!
Behold my latest connection string (since I know some of you will want
to see it anyways... ;-)
Dim MyConnection As New
SqlConnection("server=testserver;uid=test;pwd=pass ;database=adp")

I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...

Nov 19 '05 #1
10 1284
"Roy" <ro**********@gmail.com> wrote in news:1114442786.921549.57350
@f14g2000cwb.googlegroups.com:
SqlConnection("server=testserver;uid=test;pwd=pass ;database=adp")

I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...


Try appending the SQL server port number to the address (1433)

so:

SqlConnection("server=testserver,1433;uid=test;pwd =pass;database=adp")

For some reason I had to do that at work... or else I couldn't connect...
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Try connecting via Hostname or IP address.

--
TDAVISJR
aka - Tampa.NET Koder
"Roy" <ro**********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Judging from the sheer number of posts on this topic, I'm sensing this
is a fairly common problem. Only problem is, I've tried just about
every recommendation in all the posts I've found thus far and none have
worked.

I have XP on my workstation and two servers that run server 2003.
I have sql server dev edition on all 3, but only VS.NET on my
workstation.
I have .NET framework 1.1 on all 3 machines.

I can connect/interact just fine with the SQL Server instances on both
servers using EM, Query Analyzer, and VS.NET "server explorer."
However, pages I make on my workstation that connect to SQL Server on
either of the two servers fail to work. If I take the EXACT same pages
and run them on either server, they work fine.

The error I get is "Exception Details:
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied." I strongly suspect that this is a security issue, but I don't
know how to resolve it. I've given (as per other posts) the usernames
ASPNET and NETWORK SECURITY broad rights on all sql server instances,
yet still I can't run a webpage on my workstation that connects. It's
infuriating. Help!
Behold my latest connection string (since I know some of you will want
to see it anyways... ;-)
Dim MyConnection As New
SqlConnection("server=testserver;uid=test;pwd=pass ;database=adp")

I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...

Nov 19 '05 #3
"TDAVISJR" <an*******@microsoft.com> wrote in news:OzCzeRbSFHA.996
@TK2MSFTNGP09.phx.gbl:

Try connecting via Hostname or IP address.
Did you even read his post?
I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...


--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #4
Roy
heh
Took the words outta my mouth Lucas...

I tried hardcoding the port as you suggested. Still no go. :-/

Nov 19 '05 #5

"Roy" <ro**********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Judging from the sheer number of posts on this topic, I'm sensing this
is a fairly common problem. Only problem is, I've tried just about
every recommendation in all the posts I've found thus far and none have
worked.

I have XP on my workstation and two servers that run server 2003.
I have sql server dev edition on all 3, but only VS.NET on my
workstation.
I have .NET framework 1.1 on all 3 machines.

I can connect/interact just fine with the SQL Server instances on both
servers using EM, Query Analyzer, and VS.NET "server explorer."
However, pages I make on my workstation that connect to SQL Server on
either of the two servers fail to work. If I take the EXACT same pages
and run them on either server, they work fine.

The error I get is "Exception Details:
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied." I strongly suspect that this is a security issue, but I don't
know how to resolve it. I've given (as per other posts) the usernames
ASPNET and NETWORK SECURITY broad rights on all sql server instances,
yet still I can't run a webpage on my workstation that connects. It's
infuriating. Help!
Behold my latest connection string (since I know some of you will want
to see it anyways... ;-)
Dim MyConnection As New
SqlConnection("server=testserver;uid=test;pwd=pass ;database=adp")

I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...


I had a similar problem. I know very little about sql but this sequence of
steps helped me get my connection working maybe it will give you some ideas.
You problably don't need to to this at dos. You probably can do it within
sql server.

#at dos prompt osql -E -S COMPUTERNAME
exec sp_grantlogin 'COMPUTER_NAME\ASPNET'
go
#Database_Name is name of sql database without file extension
use Database_Name
exec sp_grantdbaccess COMPUTER_NAME\ASPNET
go
use Database_Name
exec sp_addrolemember 'db_owner', COMPUTER_NAME\ASPNET
go
exec sp_addrolemember 'db_datareader', COMPUTER_NAME\ASPNET
exec sp_addrolemember 'db_datawriter', COMPUTER_NAME\ASPNET
go
#Also you may need to give broader rights to some store procedures
grant execute on 'STORED_PROCEDURE_NAME' to public
Mike
Nov 19 '05 #6
Roy
Thanks for the response Mike.
I just tried your series of things and still nothing.
:(

Nov 19 '05 #7
Sorry guys, somehow I didn't get that

--
TDAVISJR
aka - Tampa.NET Koder
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
"TDAVISJR" <an*******@microsoft.com> wrote in news:OzCzeRbSFHA.996
@TK2MSFTNGP09.phx.gbl:

Try connecting via Hostname or IP address.


Did you even read his post?
I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...


--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #8
>I can connect/interact just fine with the SQL Server instances on both
servers >using EM, Query Analyzer, and VS.NET "server explorer."

If “Server explorer” works, why don’t you connect to your SQL server at 2003
and drag the db table in server explorer into your page. The VS.NET will
generate connection class automatically. Try to use this class to connect db
in code, and to see if it really works.

Shaw

Nov 19 '05 #9
"Roy" <ro**********@gmail.com> wrote in news:1114450422.152727.132890
@l41g2000cwc.googlegroups.com:
Thanks for the response Mike.
I just tried your series of things and still nothing.
:(


How about try connecting via a System DSN as a test?

Create a DSN for SQL server on the system... then use the System DSN in
your connection string.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #10
Roy
I don't think I can use a system DSN in my connection string... I
looked it up in the documentation and got this:

Note The .NET Framework Data Provider for SQL Server uses its own
protocol to communicate with SQL Server. Therefore, it does not support
the use of an ODBC data source name (DSN) when connecting to SQL Server
because it does not add an ODBC layer.

Nov 19 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mike Obiku | last post: by
1 post views Thread by Sean Abrahams | last post: by
1 post views Thread by Andrew V. Romero | last post: by
2 posts views Thread by Mick Walker | last post: by
7 posts views Thread by mac | last post: by
5 posts views Thread by geraldjr30 | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.