Skip to Content

Desynchronize Replica properties for multiple table from replication property in Power designer 16.5

May 04, 2017 at 10:01 AM


avatar image
Former Member

Hello Experts, I am trying to create replicate objects from Source to target model in Power designer 16.5. I have created replicate tables from source to target models and trying to desynchronize replicate objects (Tables) property as I need indexes to be editable from target tables.

I am able to desynchronize individual table but not able to select all at a time and make only indexes editable for 50 tables.

Is there any way in PD 16.5 to change replication property for set of 50 tables in 1 shot instead of manually select 1 by 1 table.

Your help would be appreciated.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Phillip Lam
May 04, 2017 at 07:16 PM

This is where script comes in handy.

Open the model. Go to Tools->Execute Command->Edit/Run Script. Execute the code

set Tables=ActiveModel.Tables
for each t in tables
if t.replica=true then
Set ReplInfo = t.SourceReplication
end if

Show 3 Share
10 |10000 characters needed characters left characters exceeded

To make the indexes editable, you need to go one step further. To set the "Indexes" collection in a given replication to False, use this method:

SetCollectionReplicated(ByVal Collection As String, ByVal Replicated As Boolean = True, ByVal Replicate As Boolean = True)

I haven't tried it myself, but it looks like the code would be:

SetCollectionReplicated("Indexes", True, False) - if the collection is replicated, turn off replication

Former Member

Thanks much George McGeachie and Phillip Lam. That helps a lot.


I assume that it worked :)