Using Single User mode to access the database when you are locked out
Last Updated February 23, 2017
If a customer does not know the password to any accounts with access to the database and they aren't familiar with the SA password, it is possible to access the database using single user mode. You can then add an user account that they are familiar with, or make other necessary changes.
To get access to the database, stop all of the SQL services. and then run the following command in an administrator level command prompt: "C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Binn\sqlservr" -sINSTANCENAME -m (Replace INSTANCENAME with the name of the SQL instance, and the file path if the environment has it installed some other else.) Example " C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\sqlservr" -sMSSQLSERVER -m
After it has finished starting up, leave the command prompt running and run SQL Management Studio as a administrator. You should be able to connect with Windows Authentication now. Note: Single User mode only allows for one administrator to connect at a time, so if you find it still won't let you in, try stopping all of the Altiris Services and IIS on the NS and trying again.
Once you are in, you can add a User who's credentials you do know so you an access the database normally again.
After you are finsished making changes, close the command prompt window you started SQLservr with.
Start up the SQL services normally. If you stopped any services on the NS server restart thouse as well.
Test your access to the database to confirm that you can now access it again.
Subscribing will provide email updates when this Article is updated. Login is required to Subscribe