How To Share Sql Localdb With Other Users On Same Machine?
Solution 1:
The reason this isn't working is because you're issuing the wrong command. The usage instructions from sqllocaldb.exe are:
share|h ["owner SID or account"] "private name""shared name"Based on this, your second command should be the SID or account that created the instance, not with the account you want to share the instance with. Sharing shares an instance with all accounts on the machine.
Assuming that your account created the instance you want to share, then the command you should issue is:
sqllocaldb share v11.0 myinstance
Otherwise, it should be:
sqllocaldb share "<account that created the instance>" v11.0 myinstance
In either case, you also need to ensure that you are running an elevated command window so it can be successfully shared.
Solution 2:
The problem is that LocalDB runs as a process owned by the current user, meaning each user runs their own instance of LocalDB. This is what makes it zero configuration and very easy to work with. Unfortunately, it also means it's difficult to have a shared LocalDB instance. I was running into a similar issue, and just switched to using SQL Express for a db I needed accessible by multiple users in development.
Post a Comment for "How To Share Sql Localdb With Other Users On Same Machine?"