SQL Server 2008 R2 First Time Login

32,661

Solution 1

Ended up reinstalling completely and doing a fresh install from a fresh download. When I did this I was brought through the steps of selecting the default instance, and selecting authentication modes.

Working fine now :)

Solution 2

Are you sure you have the correct instance name? If it was SQL Server 2008 R2 Express Edition then the default instance name is .\SQLEXPRESS.

Also if your using sql authentication to connect try running sql management studio as admin, if you are a limited user your identity might not be mapped to an account in sql server yet but i believe the Administrators user group is.

Solution 3

You need to check if your services are running.

Please type

net start mssqlserver

in your command prompt. Then try to login.

Share:
32,661
109221793
Author by

109221793

Updated on July 17, 2022

Comments

  • 109221793
    109221793 almost 2 years

    I've just started work on a new computer in which I had to download all the software fresh.

    I've just download a copy of SQL Server 2008 R2, and I'm trying to connect to SQL Server Management Studio without success. I vaguely remember last time I installed this, it asked me to choose between windows, or sql server authentication, however this didn't happen for this installation.

    If I try to login via Windows Authentication (where the username and password fields are greyed out, localhost as server name) it gives the following error:

    "A Network-related or instance specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)"

    I have checked everything in SQL Server Configuration Manager, and everything bar VIA is enabled.

    If I try SQL Server Authentication, It asks me for a username and password which I definiately have not set yet. Also, under SQL Server Services in configuration manager, there is nothing there.

    Any help would be appreciated :)

    Thanks

    PS: I don't know if it's worth mentioning but I am running Windows 7 as a virtual machine on a Mac.

  • 109221793
    109221793 over 13 years
    Hi Sachin, I have tried that. There don't appear to be any services present to begin with :-S
  • Sachin Shanbhag
    Sachin Shanbhag over 13 years
    @109221793 - Are you sure you have administrator rights on that machine? Also you can try to put dot(.) in place of localhost and try to login once.
  • Prahalad Gaggar
    Prahalad Gaggar about 11 years
    Worked for me. But for that you have to run your Command Prompt as Run As Administrator :)