Back

Topic

[KB478]When replication doesn’t work anymore

13 years ago
By LM
Options
Print
Applies to:

PcVue versions 8.10 to 10.0.


Summary:

If an error occurs when using the Replication Manager it may prevent success of the replication.
For example, if you lose the connection to a database during replication of the database, then we get a lock.
Be aware that if a blockage occurs during a replication, it will occur automatically for all subsequent executions of that replication.


Solution:

  1. Detection of a replication issue.
    There is no automatic means easy to implement to be notified in case of blockage of one replication. We can see it if we find that the DOS window that manages the replication process is still opened in the background. Indeed a blockage freezes the replication process for 10 minutes (timeout not adjustable).
    We can also open the replications log file and search from the top if there was a blockage. This is the file ReplicationManager.log located in the Bin directory of PcVue.We open this file with a text editor and search for the following string: “High, Defect, Exception: Expiration.” If we get a result we can deduce the date and time of first failure. Please note this information somewhere for point 3 (below). For example:
    2011/07/27, 16:44:57.367, High, Defect, Exception: Expiration du délai d’attente. Le délai d’attente s’est écoulé avant la fin de l’opération ou le serveur ne répond pas.
    A few lines above in relation to the message we can see which replication failed by looking for the string “Replication Started”:
    2011/07/27, 16:34:57.168, Highest, Inform, Between Replication Started PCPLF1 \ SVSQLEXPRESS.ALARMES to PCPLF2 \ SVSQLEXPRESS.ALARMES
  2. How to break the deadlock.
    To be able to start a new replication without blocking we must destroy ReplicationName_TimeTable table in the database. Considering the above example we must drop the table Replic_Alarmes_TimeTable in ALARMES databases of the two stations. Here’s how to do that for the station PCPLF1.

    1. Launch the Microsoft SQL Server Management Studio:
      SQL_Management_studio
    2. Connect to SQL Server instance of the station:
      SQL_Connect
      NameOfTheStation\NameOfTheSqlServer, you must change the name of the machine to connect to another station.
      Use Windows Authentication if possible or SQL Server authentication with a login and password allowed.
      Press the Connect button.
    3. Then expand the tree to make the table appear:
      Database_structure
    4. Finally remove the table from the context menu (right click):
      Delete_table
      Confirm the deletion by clicking OK in dialog box as follows:
      Delete_table_confirm
    5. Close the SQL Server Management Studio.

      Repeat steps a. through e. to remove the table from the other station. Step b. allows you to connect to SQL Server instance of the other station.

    3.What to do after breaking the deadlock?
    You must manually launch the replication that was blocked.
    Launch the Database Manager:
    Database_manager
    Choose the replication to start manually and click “Change options”
    Change_options

    Choose the option to request “Time based absolute filter” and press Next:
    Filter_date_to_date
    Choose the start date depending on what you noted in first point.
    The end date must be the current date. Click Finish.
    Finally right click on the name of the replication to run it by clicking “Load”:

    Load

    Delete the log file if no other Replications are involved in a crash.


Confirmer la suppression en cliquant sur Ok dans la boite de dialogue suivante :

Created on: 03 Aug 2011 Last update: 04 Sep 2024