Sql-server – SQL Server 2012 – cannot login

sql-server-2012windows-server

Just installed a single instance of SQL Server 2012. The instance name is called Example and the server is called WIN2K8R2. It's on a virtual machine and I am RDP'd into it. I'm trying to login with SQL Server Management Studio.

When trying to login, I get this error.

A network-related or instance-specific error occured while establishing a connection to the SQL server.

All SQL Server Services are 'running'. It's a clean build of Win2k8 R2.

Server Type: Database Engine
Server Name: WIN2k8R2\Example
Auth: Windows Auth


Resolved.

1) Deleted VM.
2) Spun up a new VM.
3) Installed SQL Server 2012

Able to login to the database from RDP.

Best Answer

During installation you were prompted to add Windows users to the SQL instance. Did you add any? Unless you added yourself as a SQL user you won't be able to connect.

  • if you added Administrators as SQL users then you must run SSMS w/o the LUA token restriction, in other words you must right click the launch icon and select "run as Administrator"

  • if you did not add any user as SQL user then you must follow the steps described in Connect to SQL Server When System Administrators Are Locked Out

  • if you don't know what you did and cannot follow the steps mentioned above, discard the VM and install SQL again. Pay attention to the installation procedure and make sure you add yourself as a valid SQL user. Read Database Engine Configuration - Account Provisioning for more details.

All SQL Server Services are 'running'.

Make sure SQL Server Browser Service is running.