Using Single User mode to access the database when you are locked out
search cancel

Using Single User mode to access the database when you are locked out


Article ID: 150131


Updated On:


IT Management Suite Client Management Suite


Using Single-User mode to access the database when you are locked out.


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 a user account that they are familiar with, or make other necessary changes. 

  1. 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​
  2. After it has finished starting up, leave the command prompt running and run SQL Management Studio as an 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.​
  3. Once you are in, you can add a user whose credentials you do know, to access the database normally again.
  4. After you are finished making changes, close the command prompt window you started SQLserver with.
  5. Startup the SQL services normally. If you stopped any services on the NS server restart those as well.
  6. Test your access to the database to confirm that you can now access it again.