forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Sja With Delete From Target
Tagged: delete from taget, SJA, target
- This topic is empty.
-
AuthorPosts
-
-
December 4, 2012 at 9:22 pm #12872gonzaloleonMember
Hi all!
I'm testing some parameters in sja, and i have a question.
I'm doing sync in one way, with “where clause present” that checks for some id = X (number of server).
The Target have all servers rows, 1, 2 and 3. Server 2 syncs one way to the target with where clause id_server = 2, what happens if i check “DELETE FROM TARGET” in sync options?
Thanks!
-
December 5, 2012 at 5:06 am #34020shubhMember
Hi,
Quoting from documentation here: http://static.webyog…I_for_MySQL.htm
“If a WHERE clause is specified then it syncs all columns of the table that satisfy the WHERE clause.”
As case specified by you, by giving “id_server = 2” will sync only those rows of the table that have “id_server = 2”. It will not sync any other rows of the table.
We have “Don't delete extra rows in target database” option in Database Sync wizard. Quoting from documentation here: http://static.webyog…SQL_Manager.htm
“The extra rows present in the target database are deleted if you keep the checkbox 'Don't delete extra row(s) in Target database' unchecked.”
-
December 6, 2012 at 9:01 am #34021Jan.SMember
However, extra rows will not be deleted under any circumstance when a WHERE clause is used.
-
December 6, 2012 at 12:41 pm #34022gonzaloleonMember'Jan.S' wrote:
However, extra rows will not be deleted under any circumstance when a WHERE clause is used.
'shubh' wrote:Hi,
Quoting from documentation here: http://static.webyog…I_for_MySQL.htm
“If a WHERE clause is specified then it syncs all columns of the table that satisfy the WHERE clause.”
As case specified by you, by giving “id_server = 2” will sync only those rows of the table that have “id_server = 2”. It will not sync any other rows of the table.
We have “Don't delete extra rows in target database” option in Database Sync wizard. Quoting from documentation here: http://static.webyog…SQL_Manager.htm
“The extra rows present in the target database are deleted if you keep the checkbox 'Don't delete extra row(s) in Target database' unchecked.”
Thats right but, take this example:
One Way sync (with delete extra rows on target)
Read on Master -> Write changes to Slave
Where id_server = 2 -> 130 (rows) -> Target: where id_server = 2 -> 134 (rows) -> then delete those extra (4) rows.
This is possible?
-
December 7, 2012 at 9:41 am #34023Jan.SMember
Hi,
Like I mentioned, whenever a where clause is used, we do not delete any data irrespective of if the “delete extra rows in target” is checked or not. However, we are releasing 10.5 GA within a week, which includes a visual data comparison tool which can be used to delete the extra rows. The beta version with this feature has been released. You can take a look at it and download from here.
Regards,
Janani
-
December 7, 2012 at 10:20 am #34024peterlaursenParticipant
One additional comment: SJA executes the WHERE clause on the source only and not on the target. If we should deleted on target this would be without considering the WHRE clause. That is why we have disabled DELETE when a WHERE clause is used..
-
December 7, 2012 at 1:06 pm #34025gonzaloleonMember'peterlaursen' wrote:
One additional comment: SJA executes the WHERE clause on the source only and not on the target. If we should deleted on target this would be without considering the WHRE clause. That is why we have disabled DELETE when a WHERE clause is used..
Sure, that's why i post my example for futures developments.
'Jan.S' wrote:Hi,
Like I mentioned, whenever a where clause is used, we do not delete any data irrespective of if the “delete extra rows in target” is checked or not. However, we are releasing 10.5 GA within a week, which includes a visual data comparison tool which can be used to delete the extra rows. The beta version with this feature has been released. You can take a look at it and download from here.
Regards,
Janani
I'm going to test.
Thanks!
-
-
AuthorPosts
- You must be logged in to reply to this topic.