on 05-04-2017 11:01 AM - last edited on 02-03-2024 9:07 PM by postmig_api_4
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.