I have a remote server with SQL Server 2005 Express installed on it. I
try to connect to it from my local machine using TCP/IP. I have the
remote SQL Express set to mixed mode and enabled TCP/IP.
If I connect using a self-created login it works fine and I can run
queries against the database. However whenever I try to login with the
'sa' account, it doesn't work (Login failed). I'm 100% sure the 'sa'
account is enabled and the password is correct. When I connect using
MSSMSE from my local machine to the remote SQL Express using the 'sa'
account it works fine and I can do everything.
So, the password I use for the 'sa' account is definitely correct but
somehow it doesn't allow me to connect from anything else than MSSMSE.
E.g. the following VBscript does not work:
Set Conn = CreateObject("ADODB.Connection")
Conn.Open "Provider=SQLOLEDB;Data
Source=10.10.10.94;DATABASE=Test;User Id=sa;Password=testing;Connect
Timeout=3;network library=DBNETLIB;"
Conn.Close
Set Conn = Nothing
It gives:
C:\test.vbs(2, 1) Microsoft OLE DB Provider for SQL Server:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.
When I connect with isql, I get "Login failed for 'sa'".
It has kept me busy for almost 4 hours already and I can't figure out
what's going on. It feels like some security settings in SQL Express
prevents me from using the 'sa' account from any application except
MSSMSE.
Any help is appreciated...
Grtz,
Marco>E.g. the following VBscript does not work:
>Set Conn = CreateObject("ADODB.Connection")
>Conn.Open "Provider=SQLOLEDB;Data
>Source=10.10.10.94;DATABASE=Test;User Id=sa;Password=testing;Connect
>Timeout=3;network library=DBNETLIB;"
>Conn.Close
>Set Conn = Nothing
I fixed the problem. For anybody interested, here's how I fixed it...
The problem was most likely not related to the account. I probably
made a mistake while testing it. Or mixed results might have been
caused by the fact that I tested with both dynamic ports and fixed
ports.
The problem was fixed by changing the "Data Source". I changed it to:
Data Source=SERVER\SQLINSTANCE
So, e.g.:
Data Source=10.10.10.94\SQLEXPRESS1
This is with Dynamic ports.
Cheers,
Marco
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment