- Shekhar Govindarajan`s Blog - http://www.shekhargovindarajan.com -

SQL Server 2008 R2 on Windows 8: “” is not a valid login or you do not have permission

Got rid of Windows 7 and installed Windows 8 RTM on my laptop. To get back to work, went right ahead to install Visual Studio and SQL Server.

Installation of Visual Studio 2010 was a breeze but SQL Server 2008 R2 left me with a dreadful error saying – “” is not a valid login or you do not have permission. This showed up during the installation.

By ignoring this error, the installation proceeds but I was unable to login using SQL Server Management Studio.

When I popped up the installation of SQL Server, it did complain about compatibility issues. But I chose to ignore it. This is because the solution suggested that I should upgrade to Service Pack 1 post installation. Well, only if I could finish the installation without errors 😉

Obviously, to start with,  I googled for any known issues with SQL Server 2008 R2 and Windows 8. I ended up wasting my time. I should have googled for the error message instead.

When I googled for the error message, many articles suggested that this happens when the computer name and the username are the same. This hinders the Windows Authentication for SQL Server. My username on Windows 8 was Shekhar\Shekhar !!!

But how come I never faced this issue before on Windows < 8 (like Windows 7, XP) ?

During the installation of Windows 8, I had set the computer name as Shekhar. The installation did not prompt me to create a user because Windows 8 uses the Microsoft Live ID for login. Windows < 8 allows to create a username during the installation and complains big time if the username and computer name are the same. The login or Email of my Live ID is shekhar at it4enterprise dot com. After installation of Windows 8, when I logged in using my Live ID, Windows 8 created a user called Shekhar.

During the installation of SQL Server, when I was prompted to select a user for Windows Authentication, I opted to click on “Add Current User” which was Shekhar/Shekhar. And hence the error.

The fix was as easy as going to Computer>Properties>Change Settings and changing the Computer Name by clicking on the Change button. I changed the Computer Name to Shekhar-Laptop.

Henceforth, I rebooted the computer, uninstalled SQL Server and reinstalled it. And this time no errors during the installation. I was also able to login using SQL Server Management Studio and got started with some real work! 🙂

GD Star Rating
loading...
GD Star Rating
loading...