cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member200945
Contributor
0 Kudos

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
ReplInfo.delete
end if
next

GeorgeMcGeachie
Active Contributor

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
0 Kudos

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

GeorgeMcGeachie
Active Contributor
0 Kudos

I assume that it worked 🙂