SQL Server shared LocalDB instance is not automatically starting

Cory Riddell 0 Reputation points
2024-10-01T15:33:46.8233333+00:00

I have an application that uses LocalDB. The named instance "PrivDb" is owned by whatever account installed the application. Part of the setup process is to grant "NT AUTHORITY\Authenticated Users" the sysadmin role so that any authenticated user can connect and the instance is shared as "SharedDb".

When another user on the machine tries to connect to the shared instance, it fails with this error:
User's image

If I manually start the instance as the user who installed it, other users on the machine can connect to the instance.

I'm running SQL Server Express 2022 with cumulative update 15 installed.

Is there something else that I have to configure so that the shared instance will automatically start when other users connect to it?


My problem seems identical to this one:
https://support.microsoft.com/en-us/topic/kb5003342-fix-sql-server-express-localdb-can-t-start-or-connect-to-shared-instances-of-sql-server-express-localdb-2019-or-2017-29147198-d431-47a4-80f0-ece917f28859

except I'm on the 2022 release.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,803 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. ZoeHui-MSFT 36,511 Reputation points
    2024-10-02T06:42:06.2066667+00:00

    Hi @Cory Riddell,

    What about creating a batch file containing only the command starting SQL Server Express and schedule a task via Task Scheduler.

    https://dba.stackexchange.com/questions/52697/how-to-auto-start-instance-of-sql-server-2012-localdb-on-startup

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


  2. Olaf Helper 44,501 Reputation points
    2024-10-02T06:57:15.7733333+00:00

    The server name "(LocalDB).\ShareDB" is wrong, exactly the addition slash+dot, remove "." =>

    "(LocalDB)\ShareDB"


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.