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

  • it's telling you to input your username / password. Commented Mar 7, 2010 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,

  • I tried both of them but still couldn't connect. How could be the connection string to solve this problem ?
    – sml
    Commented Mar 7, 2010 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.

You must log in to answer this question.