“The Only Thing That Is Constant Is Change”

Adding Admin Login to SQL Server

Posted by database-wiki on June 14, 2016

> Try to download and install SQL Server Management studio express and try to login
the customers Windows Account.
> We should be encountering the error à Login failed error 18456.

— Follow the following steps to resolve the issue,

1> Start SQL in single user mode
C:\program files\microsoft sql server\MSSQL.1\MSSQL\Binn\sqlservr.exe -s ACT7-m


sqlservr.exe –m (or sqlservr.exe –f) {default instance}

2> Open another CMD window and connected to the instance by,

C:\sqlcmd -S <computer-name>\ACT7 -E


sqlcmd -S.  {default instance}

1>Create login [Windows Account] from windows <Eg. ComputerName\Username>
1>Sp_addsrvrolemember ‘Windows Account’,’sysadmin’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: