What would be the best way to sync the QB users and groups between these two environments? Is there a built-in function, or can this be scripted via the API?
What would be the best way to sync the QB users and groups between these two environments? Is there a built-in function, or can this be scripted via the API?
http://wiki.pmease.com/display/QB50/Interact+with+Users
http://wiki.pmease.com/display/QB50/Int ... ith+Groups
http://wiki.pmease.com/display/QB50/Int ... emberships
Here's an example of how this creates a problem:
- Assume we want to completely sync all security from server A to server B
- Assume server A initially has 5 groups, with IDs 1, 2, 3, 4, and 5
- Assume server B initially has 3 groups with IDs 1, 2, and 4. There is no group 3 because it was previously deleted
- There are Memberships, Authorizations, and a Group defined on server A with Group ID=3
As Group ID=3 previously existed on server B, when trying to create a new group it will actually receive ID=5 (since that is the next sequential ID that has not yet been used). Since you can't specify ID # when creating a group (by any method that I have found), you're now stuck with a set of data from Server A pointing to an ID that will never again exist on Server B. I suppose one could script a hash table to line up all of the IDs from one server to the next for the sync, but that seems like a lot of unnecessary work, and it still wouldn't result in having truly matching / synchronized security data on both of the servers (since the membership and authorization maps will still be completely different). I have a feeling I'm going to encounter exactly the same issue with the User IDs when trying to recreate users on Server B (though I haven't tested that yet)...
Is there any way to directly migrate the users, groups, memberships and authorizations across servers without having to fight with this issue?
In this way groups, users can be synced, then you may retrieve memberships from A to see how they set up user/group relations based on names, and again to create the same relationship based on name in B.
1. The destination QB instance has to be restarted after copying as it won't realize underline data change.
2. You might encounter strange issues if ID of rows in these table conflicts with destination database.
Regarding the row IDs conflicting, as long as we're completely dropping the destination tables before restoring from the other server how would / could that happen?