Unsupported Screen Size: The viewport size is too small for the theme to render properly.

can sja do this sync?

  • This topic is empty.
Viewing 7 reply threads
  • Author
    Posts
    • #8502
      jdhr
      Member

      I´ve two db (A & 😎 with two identicals tables (tA & t:cool:, I want to sync data from tA to tB and then automatically delete the rows from tA, all with sja.

      Does anyone knows if I can do this? Thanks.

    • #16097
      Ritesh
      Member
      Quote:
      then automatically delete the rows from tA

      Do you mean that you need to TRUNCATE all the data of tA?

    • #16098
      Shadow
      Member

      Well, not directly, but it can be done. All you need to do is to set up two syncronization sessions. One will sync tA to tB and the other one will sync an empty table to tA (since the source table is empty, none of the rows in tA will have a matching record and therefore each row gets deleted). This method is not too fast as the deletion is done row by row. As an alternative, you may use notification service's maintenance query tool to time the execution of a TRUNCATE TABLE statement.

      Ritesh: Is it possible to put two jobs of different type (a data sync and a notification) into one xml file?

    • #16099
      Shadow
      Member

      I tried it out and found it impossible to execute a job file containing two different queries successfully. Either only the notification job was executed or the sync job failed saying “Lost connection to MySql server during query” (2013). Sja apparently locates the password needed for connecting to the SOURCE MySql in a syncjob in a wrong way. It seems to locate the first psw node with data regardless of the node's relative position…

    • #16100
      Ritesh
      Member
      Quote:
      Ritesh: Is it possible to put two jobs of different type (a data sync and a notification) into one xml file?

      No. 🙁

      Quote:
      I tried it out and found it impossible to execute a job file containing two different queries successfully. Either only the notification job was executed or the sync job failed saying “Lost connection to MySql server during query” (2013). Sja apparently locates the password needed for connecting to the SOURCE MySql in a syncjob in a wrong way. It seems to locate the first psw node with data regardless of the node's relative position…

      Can you explain the problem a little more?

    • #16101
      Ritesh
      Member
      Shadow wrote on Jul 20 2004, 11:07 AM:
      Well, not directly, but it can be done. All you need to do is to set up two syncronization sessions. One will sync tA to tB and the other one will sync an empty table to tA (since the source table is empty, none of the rows in tA will have a matching record and therefore each row gets deleted). This method is not too fast as the deletion is done row by row. As an alternative, you may use notification service's maintenance query tool to time the execution of a TRUNCATE TABLE statement.

      I would suggest the second method 😀

    • #16102
      Shadow
      Member

      The second method would be truly better, but how do you plan to time the execution of the notification job (how do you detect the completion of the sync job)?

      Quote:
      ja apparently locates the password needed for connecting to the SOURCE MySql in a syncjob in a wrong way. It seems to locate the first psw node with data regardless of the node's relative position…

      I joined a syncjob and a notification job in a single xml file. When SJA parses the file, it apparently takes the value of the first psw node that contains any data (nodeTypedValue<>“”) as the password of the SOURCE db even if that node is located in the other job (notifyjob). Otherwise, it could work… Ritesh, consider this as a feature request!

    • #16103
      Ritesh
      Member

      Well we have already started working on SQLyog 3.8 that will have PHP Tunneling. I guess this feature would be seen in SQLyog 3.9 or later.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.