Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm getting this error message while I'm trying to connect a sql 2008 database which is in another computer.

share|improve this question

migrated from stackoverflow.com Mar 7 '10 at 16:42

This question came from our site for professional and enthusiast programmers.

    
it's telling you to input your username / password. –  futureelite7 Mar 7 '10 at 15:01

2 Answers 2

It seems you are using Windows Authentication (Trusted) to connect to the remote database. In this case the process running the application's credentials are used to authenticate with. Normally a domain setup makes the most sense for this type of authentication scheme.

In your case you authentication with Guest user. You can add the Guest user as an allowed user login and user on the database.

Windows authentication has a number of advantages. If that is not going to work for you then use SQL authentication (Mixed Mode) and supply a username and password to connect with,

share|improve this answer
    
I tried both of them but still couldn't connect. How could be the connection string to solve this problem ? –  sml Mar 7 '10 at 15:07

As Philip points out you are probably using Windows Authentication. Do you have anything in your database connection string that says Integrated Security=true or Integrated Security=SSPI? In that case, remove it and put in User ID=sqluserid;Password=XXX where you replace sqluseridfor a valid SQL server logon and XXXfor the corresponding password.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.