1
votes

I am new to SQL Server 2012. I have installed SQL Server 2012 on my local machine successfully. When I try to connect to it using Management Studio, I am getting errors. I am not able to connect using Windows Authentication or SQL Server Authentication. I didn't get any screen asking for username or password while installing SQL Server. What credentials should I use to connect via SQL Server Authentication. PFB screen shots of the errors for both modes:

Windows authentication:

loginscreen

SQL Server authentication:

loginscreen

Error message:

errormessage

Please help me resolve this error. I have been stuck for a week here.

2

2 Answers

3
votes

First step: go to the Start Menu > All Programs > Microsoft SQL Server 2012 > Configuration Tools > SQL Server Configuration Manager.

You should see a screen something like this:

enter image description here

You should see at least one entry named SQL Server (instance name) and it should be in the Running state.

NOTE: if there is no entry labeled SQL Server (....), then you don't have SQL Server installed. Reinstall it.

If that entry is not in the Running state, then you just need to start it.

If that "instance name" is indeed SQLEXPRESS, then you should be able to connect to .\SQLEXPRESS as your machine/instance name.

However, if that name is anything else, then:

  • if the "instance name" is MSSQLSERVER (as in my screenshot), then you have an unnamed default instance - connect to it using . (just a dot), or (local) (with the parenthesis!)
  • if the "instance name" is anything else than that, connect to it using .\instance or (local)\instance - just use dot or (local) to denote the local machine, and then a backslash and the instance name that you find in the screen
0
votes

Are you sure you are connecting to SQL Express? .\SQLEXPRESS should work on a local machine. You can try looking at Services on your machine and if you see SQL Server (MSSQLSERVER) among the services listed you have full SQL Server installed on your machine and you can connect to it using (local) and Windows Authentication. You were prompted during the install as to what account should be used for the Admin account and hopefully that is the account you are logged into windows as you try to login.