Solved

replication synchronisation successful?

Posted on 2013-01-15
3
151 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 500 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 57
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now