1

B"H

How can I use Azure Data Sync with localdb?

Please note: I am not asking about using it with a "Local Database" as in an on-prem database. I am speaking specifically about the technology (particular Sql Server Edition) known as localdb. As in (localdb)\MSSQLLocalDB.

The issue is adding the localdb instance to SQL Data Sync Agent. The agent must be run under an entity (windows login) that has permission to run as a service. It can not be run using a windows live identity which is what the users are usually logged in as. Yet it also needs to have permissions to the database in localdb.

Use Case:

I have a central database running in Azure. With multiple users with laptops and limited internet connection, running local apps (some built in Access). Connecting directly from the apps to Azure is too slow or otherwise impractical. Therefore I install the lightweight localdb as a cache for the users data. Which will be merged using Azure Data Sync.

I am currently using a solution built directly on Microsoft Sync Framework. However there is a maintenance overhead on that solution. So I would like to migrate to the Microsoft maintained Azure Data Sync.

Thank you

5
  • 1
    Why not use SQL Server Express?
    – ErikEJ
    Commented Feb 5, 2020 at 18:10
  • Because it is much heavier, needs to be installed separately, is constantly running in the background and taking up lots of resources (not only when you're using this app). These are the reasons that Microsoft created localdb. They literally created this edition specifically for this scenario. So I'd like to continue using it for all those benefits.
    – Rabbi
    Commented Feb 5, 2020 at 19:21
  • @ErikEJ Doing a quick search. I see that you are the one always explaining to everyone else what the difference is between Express and LocalDb and when and why you'd use each. Why did you change your tune for my scenario?
    – Rabbi
    Commented Feb 5, 2020 at 19:26
  • maybe you should take a look at github.com/Mimetis/Dotmim.Sync Commented Feb 12, 2020 at 12:13
  • Thank you! Looks like you have a great product there. I will look into it.
    – Rabbi
    Commented Feb 13, 2020 at 16:09

1 Answer 1

0

B"H

Ok, it was actually a silly mistake.

You actually can run the SQL Data Sync Agent using a windows live identity. You just need to use the local user name. Which is the name of the folder for that user in the Users folder. You must also use the name of the computer in the format MyComputer\localUserName. Once I was running the SQL Data Sync Agent under the currently logged in user - who also has access to the DB - everything else ran smoothly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.