How do I run a localDB instance in single-user mode? RRS feed

  • Question

  • I am trying to restore the master db of a localDB server instance in SQL Server 2016. I cannot seem to figure out how to run the server in single-user mode so I can restore the master in SSMS. I know I can run the db with SQLLocalDB.exe but this does not specify a single-user argument option. When i run the following command:

    C:\Program Files\Microsoft SQL Server\130\LocalDB\Binn> .\sqlservr.exe -c -m -S "(localdb)\MSSQLLocalDB"

    I get an error that the "parent instance name exceeds maximum length"

    Does anyone know how to run this localdb instance in single-user mode, so I can restore the master db from a .bak file?


    • Edited by ruptr Tuesday, September 29, 2020 8:55 AM
    Tuesday, September 29, 2020 8:54 AM


  • ruptr --

    You have erroneously posted your SQL Server question in a user form dedicated to questions about Microsoft Project Server, an enterprise project management app.  I would recommend you repost your question in one of the Microsoft Q&A forums dedicated to SQL Server at:

    Hope this helps.

    Dale A. Howard [MVP]

    Tuesday, September 29, 2020 12:21 PM