?
Solved

replication synchronisation successful?

Posted on 2013-01-15
3
Medium Priority
?
160 Views
Last Modified: 2013-01-19
hey guys,

i just tested and realised that we can't sync 2 databases at once to the main replica on the network. the 2nd database that i'm trying to sync will say that there was an error or something like that.

how can i programmatically tell that the sync was not successful and thus queue it up to sync again? thanks guys!! hrmm, i haven't tested using the method of err and on error goto 0 then looping until there is no error and exit sub, but if yall have better ways of testing if it were successful let me know ya! thanks guys!!g
0
Comment
Question by:developingprogrammer
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 38782051
If you are getting an actual error message and number, I would suggest standard error handling techniques as you described.

Another thing you can try is creating a table for synchronization history.  Write details such as user, date/time, Replica Name or ID, ETC to the history table immediately before sychronizing.   Such a table can be used to determine if syncronization was successful, and it can also let you/the user know the time of the last synchronization, and any other info you chose to store.

 If the synchroniztion was successful, you will have a matching record in the history table in your Master Design copy of the database.

You can query the Master Design copy like this:

SELECT tblSynchronizationHistory.*
FROM tblSynchronizationHistory IN "YourPath\YourMasterDatabase.mdb";

Open in new window


You can also use a "unmatched query" that Joins the history table in your replica with the history table in your Master Copy to determine if there are any unmatched records:

SELECT rep.*
FROM tblSynchronizationHistory rep 
LEFT JOIN tblSynchronizationHistory  IN "YourPath\YourMasterDatabase.mdb" m
ON rep.ID = m.ID;

Open in new window


If there are any records in the results immediately after a synchronization attempt, that indicates that the data is not the same and the synchronization was not successful.

I personally haven't used this method (again I've never had a need to replicate/synchronize databases), but it is something I would try myself with that setup.
0
 
LVL 58
ID: 38782503
<<i just tested and realised that we can't sync 2 databases at once to the main replica on the network. the 2nd database that i'm trying to sync will say that there was an error or something like that. >>

 Are you doing the synch in code or through replication manager?

Jim.
0
 

Author Comment

by:developingprogrammer
ID: 38796404
thanks jim, i was doing it through replication manager but now i'm doing it in code. mbizup gave me this code to check if we could find the design master (1st check) and then later i did a resume on error and and error would give a non-zero err object so i checked for non-zero err object (2nd check).

mbizup, thanks for your codes and suggestions / guidance! always fantastic advice as usual!! = ))
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question