forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › can sja do this sync?
- This topic is empty.
-
AuthorPosts
-
-
July 19, 2004 at 3:35 pm #8502jdhrMember
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.
-
July 20, 2004 at 6:30 am #16097RiteshMemberQuote:then automatically delete the rows from tA
Do you mean that you need to TRUNCATE all the data of tA?
-
July 20, 2004 at 11:07 am #16098ShadowMember
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?
-
July 20, 2004 at 11:54 am #16099ShadowMember
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…
-
July 20, 2004 at 12:18 pm #16100RiteshMemberQuote: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?
-
July 20, 2004 at 12:19 pm #16101RiteshMemberShadow 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 😀
-
July 20, 2004 at 3:18 pm #16102ShadowMember
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!
-
July 20, 2004 at 5:06 pm #16103RiteshMember
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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.