I am using a SQL Server 2012 LocalDB instance that is shared for all users. I have also created a SQL Server login which can be used for all users. This are the commands I am using (executing as 'Administrator'):
SqlLocalDb.exe create Test
SqlLocalDb.exe share Test TestShared
SqlLocalDb.exe stop Test
SqlLocalDb.exe start Test
// Sql Commands
CREATE LOGIN {0} WITH PASSWORD = '{1}'
EXEC master..sp_addsrvrolemember @loginame = '{0}', @rolename = 'sysadmin'
But when performing a system restart, it seems the the instance is not started automatically. Connecting to the instance as 'User' brings the following error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 40
Performing "sqllocaldb start .\TestShared " as non-owner of the database instance does not help, so I need to execute this statement as the owner (which of course is not available upon each restart).
How can I configure LocalDb so that the instance is accessible for all users when the computer is restarted?