Skip to main content

Check the error log which usually under the folder C:\Users<youraccount>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0%localappdata%\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0 will give you big hints.

Log back in as the administrator account (not an administrator), and start a command prompt with Run As Administrator. Then run this:

sqllocaldb share v11.0 MyInstance

You might want to explicitly add your Windows account as a sysadmin on this instance if that is a goal. So:

sqllocaldb start MyInstance

Then connect with SQLCMD, Management Studio, what have you, and run:

CREATE LOGIN [Domain\Username] FROM WINDOWS;
EXEC sp_addsrvrolemember N'Domain\Username', N'sysadmin';

Now log back in as your Windows account, and you should be able to start this instance using:

sqllocaldb start MyInstance

(It may already be started depending on your O/S and how you switched accounts.)

Then Domain\Username should be able to connect using SQLCMD, SSMS etc. using (localdb)\.\MyInstance.

Check the error log which usually under the folder C:\Users<youraccount>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0 will give you big hints.

Log back in as the administrator account (not an administrator), and start a command prompt with Run As Administrator. Then run this:

sqllocaldb share v11.0 MyInstance

You might want to explicitly add your Windows account as a sysadmin on this instance if that is a goal. So:

sqllocaldb start MyInstance

Then connect with SQLCMD, Management Studio, what have you, and run:

CREATE LOGIN [Domain\Username] FROM WINDOWS;
EXEC sp_addsrvrolemember N'Domain\Username', N'sysadmin';

Now log back in as your Windows account, and you should be able to start this instance using:

sqllocaldb start MyInstance

(It may already be started depending on your O/S and how you switched accounts.)

Then Domain\Username should be able to connect using SQLCMD, SSMS etc. using (localdb)\.\MyInstance.

Check the error log which usually under the folder %localappdata%\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0 will give you big hints.

Log back in as the administrator account (not an administrator), and start a command prompt with Run As Administrator. Then run this:

sqllocaldb share v11.0 MyInstance

You might want to explicitly add your Windows account as a sysadmin on this instance if that is a goal. So:

sqllocaldb start MyInstance

Then connect with SQLCMD, Management Studio, what have you, and run:

CREATE LOGIN [Domain\Username] FROM WINDOWS;
EXEC sp_addsrvrolemember N'Domain\Username', N'sysadmin';

Now log back in as your Windows account, and you should be able to start this instance using:

sqllocaldb start MyInstance

(It may already be started depending on your O/S and how you switched accounts.)

Then Domain\Username should be able to connect using SQLCMD, SSMS etc. using (localdb)\.\MyInstance.

Check the error log which usually under the folder C:\Users<youraccount>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0 will give you big hints.

Log back in as the administrator account (not an administrator), and start a command prompt with Run As Administrator. Then run this:

sqllocaldb share v11.0 MyInstance

You might want to explicitly add your Windows account as a sysadmin on this instance if that is a goal. So:

sqllocaldb start MyInstance

Then connect with SQLCMD, Management Studio, what have you, and run:

CREATE LOGIN [Domain\Username] FROM WINDOWS;
EXEC sp_addsrvrolemember N'Domain\Username', N'sysadmin';

Now log back in as your Windows account, and you should be able to start this instance using:

sqllocaldb start MyInstance

(It may already be started depending on your O/S and how you switched accounts.)

Then Domain\Username should be able to connect using SQLCMD, SSMS etc. using (localdb)\.\MyInstance.

Log back in as the administrator account (not an administrator), and start a command prompt with Run As Administrator. Then run this:

sqllocaldb share v11.0 MyInstance

You might want to explicitly add your Windows account as a sysadmin on this instance if that is a goal. So:

sqllocaldb start MyInstance

Then connect with SQLCMD, Management Studio, what have you, and run:

CREATE LOGIN [Domain\Username] FROM WINDOWS;
EXEC sp_addsrvrolemember N'Domain\Username', N'sysadmin';

Now log back in as your Windows account, and you should be able to start this instance using:

sqllocaldb start MyInstance

(It may already be started depending on your O/S and how you switched accounts.)

Then Domain\Username should be able to connect using SQLCMD, SSMS etc. using (localdb)\.\MyInstance.

Check the error log which usually under the folder C:\Users<youraccount>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0 will give you big hints.

Log back in as the administrator account (not an administrator), and start a command prompt with Run As Administrator. Then run this:

sqllocaldb share v11.0 MyInstance

You might want to explicitly add your Windows account as a sysadmin on this instance if that is a goal. So:

sqllocaldb start MyInstance

Then connect with SQLCMD, Management Studio, what have you, and run:

CREATE LOGIN [Domain\Username] FROM WINDOWS;
EXEC sp_addsrvrolemember N'Domain\Username', N'sysadmin';

Now log back in as your Windows account, and you should be able to start this instance using:

sqllocaldb start MyInstance

(It may already be started depending on your O/S and how you switched accounts.)

Then Domain\Username should be able to connect using SQLCMD, SSMS etc. using (localdb)\.\MyInstance.

Source Link
Aaron Bertrand
  • 180.8k
  • 28
  • 401
  • 617

Log back in as the administrator account (not an administrator), and start a command prompt with Run As Administrator. Then run this:

sqllocaldb share v11.0 MyInstance

You might want to explicitly add your Windows account as a sysadmin on this instance if that is a goal. So:

sqllocaldb start MyInstance

Then connect with SQLCMD, Management Studio, what have you, and run:

CREATE LOGIN [Domain\Username] FROM WINDOWS;
EXEC sp_addsrvrolemember N'Domain\Username', N'sysadmin';

Now log back in as your Windows account, and you should be able to start this instance using:

sqllocaldb start MyInstance

(It may already be started depending on your O/S and how you switched accounts.)

Then Domain\Username should be able to connect using SQLCMD, SSMS etc. using (localdb)\.\MyInstance.