Our product scales from a low end installation running Sql Express to a multi-box solution, running the data center version of Sql Server. Our problem is that on the low-end we install our solution on the customer’s hardware and those customers don't want to have Sql Server installed on their machines.
When we heard about localdb we thought, no problem, we will use localdb for our low end customers. This has, however; turned out to be anything but easy to do.
Here are the steps we have to take to get localdb to run under a service running as "NT AUTHORITY\LOCAL SERVICE"
1) Use psexec (from sysinternals) to create a localdb instance.
2) Use psexec to start the newly created instance
3) Use psexec to add sysadmin permissions to the admin user running the installer
4) Run the database create and update scripts as the install user
5) Also I believe I need to have my c# windows service force the User Profile to be loaded by using an interop call to the windows api LoadUserProfile, otherwise I get connection problems.
NOTE: This solution will not work because psexec cannot be redistributed. Other tools like PsExec do not seem to work when running commands under “NT AUTHORITY\LOCAL SERVICE”.
Why is this installation scenario so difficult? Are we missing something? Surely this is not an uncommon scenario and that the localdb team would not have been so cruel as to inflict this sort of pain on its users? Please say it isn’t so.