Hello everyone, I am trying to connect to a remote SQL 2005 database from Microsoft SQL Server Management Studio.
I enabled the remote connection on the server and creating a user on the server.
I am trying to connect to the server from my workstation using sql server authentication with the login name already created on the server.
I am receiving this error: cannot connect to "server name"
cannot open user default database. Login failed.
Login failed for user "username".(Microsoft SQL Server, Error: 4064)
Can you help?
Whilst you created an account on the machine, have you granted that account access to its default database which hopefully is your application database?
Also, you can investigate what the connection string should be like:
1) Create an empty text file in windows explorer and rename it to X.UDL
2) Double click on it and the datalink provider dialog will appear.
3) Select the provider tab. Find the provider for SQL Server express and click next.
4) Select your database and select integerated authentication.
5) Test the connection and save it.
6) Compare the contents of X.UDL with your connections string.
You could try looking on http://www.connectionstrings.com/ for examples of connection strings.
HTH
No comments:
Post a Comment