Posted on: 2/8/2014 4:21:43 PM | Views : 2110

Currently we use a DB in SQL Server Express. We access this DB from a Windows Service that is running as Local System. The Windows Service connects to DB with SQL Authentication. Now we would like to Switch to LocalDB from SQL Server 2012. I have read that it should be possible to connect to a LocalDB from a Windows Service. But somehow I don't succeed to set it up. What I have done so far:
- I have detached database from SQL Server Express - I created a named instance with LocalDB - I attached my MDF to the new instance - I shared this instance with SQLLocaldb.exe - my Connectionstring Looks like this: Data Source=(LocalDB)\.\myDbShared;Integrated Security=true;Initial Catalog=myDb;User Id=user1;Password=pwd1;Persist Security Info=True;MultipleActiveResultSets=True;
If the Service trys to connect DB I get this error message: "Login failed for user 'NT AUTHORITY\SYSTEM'."
So what am I doing wrong?

Go to the complete details ...