Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Studio Express 2005 - Servedoes not exist or access denied.

Status
Not open for further replies.

ton12

Programmer
Mar 9, 2005
58
GB
Moved to a new server (Windows 2003 web edition)and also moved from MSDE to SQL Server Management Studio Express 2005

I'm new to SQL Server Management Studio Express 2005
and just created a user database.

When I'm trying to access it thru my .asp program
thru a website, I'm having the following error message:

------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.
/testlogin.asp, line 48
------------------------------------------------------------


This is part of the code :

set conn = Server.CreateObject("adodb.Connection")
conn.Open Application("strConn") <=== line 48
..
..
..
Application("strConn") = "DRIVER={SQL Server};database=testdb;uid=testuid;pwd=testpwd;server=testserver;"
..
..

The database seems to be fine as I can query it on the server.Seems to be a permission issue..isn't it? If this is the problem, how should I proceed or may be it's a different issue!!

Thanks in advance for your help.
Ton.
 
Check your user account. Run this from your database.
Code:
sp_change_users_login 'REPORT'

If you get back your user name you can fix it with.

Code:
sp_change_users_login 'update_one', 'user', 'user'

- Paul
- Database performance looks fine, it must be the Network!
 
Thanks for your suggestion but

sp_change_users_login 'REPORT'

didn't return anything..

Ton
 
Have you configured the server to accept remote connections with the surface area config tool?


- Paul
- Database performance looks fine, it must be the Network!
 
Paul,

The remote connection is enabled and the protocols
are fine.

Just sorted it out because the server name is
'testserver\testserver'.

Thanks anyway.
Ton.
 
had the same problem:

trying to login from a php script with :
'$server="USER\C1";
$username="root";
$password="pass";
$sqlconnect = mssql_connect($server,$username,$password) or die("error");' gives this error

'Unable to connect: SQL Server is unavailable or does not exist. Access denied. (severity 9)'
'Unable to connect to server: USER\C1', but

in sqlcmd, typing the command :
'sqlsmd -U root -P pass -S USER\C1' it works just fine.

where's the problem?
 
What permissions does the login actually have in the database? If it's not mapped to the DB at all, then that could be the problem.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top