views:

19

answers:

3

Hello there,

My machine Win7 has SQL Server 2005 and SQL Server 2008 installed. Also, Sql Server Management Studio is installed with SQL Server 2008.

Now, I want to connect to SQLEXPRESS instance running currently on my machine.
How do I know if i will need Management Studio 2005 or 2008 to connect to SQLEXPRESS?

Just to add that I have already tried connection with SSMS 2008, but it says

Can't connect to .\SQLEXPRESS, Login failed.

One thing I just noticed is that under Windows Authentication,
User name is showing my user name with which I logged in to Windows.
But this machine used to belong to someone else and computer name has not changed to mine.
Could this be reason for login failure?

Thank you!

A: 

Make sure that appropriate SQL Server service is running

abatishchev
yes, sql express service is running, any other service to check?
inutan
@inutan: Have you added the account you have logged in to administrator while sql server setup? have you enabled mixed auth (sa)? try to login by sa and add your user to admins
abatishchev
A: 

"Login failed" means you have connected but were rejected.

Is the login you use set up in SQL Server?

By default, local admins on the box are are sysadmin in SQL Server so something has changed if you connected previously

gbn
using windows authentication to login
inutan
+1  A: 

SSMS2008 can connect to SQLExpress 2005 or 2008 instances, so use that version.

Login failed can mean several things:

  • the database is not running (the service is stopped)
  • you got the machine or instance name wrong
  • your credentials (login/pass) were wrong or you used the wrong authentication method
slugster
Btw, how can I check which version of SQLEXPRESS is running on my machine. Also, have updated my question if you can comment on that. Thanks you!
inutan
@inutan - if the previous owner was the one who set it up and they included themselves as the SQL admin but also did not create any other logins then this could explain your problem. Either get that person to log back in and set up a new login, or use SQL Authentication and the `sa` login if it is enabled and you know the password.
slugster
Thank you, was able to login after adding a new login with my name. Btw, how can I check which version of SQLEXPRESS is running on my machine
inutan