on 08-14-2018 3:15 PM
Hi,
I replicated 1000 tables to another model. Put the replicated tables into the package.
Now I unchecked on column level the Replication Properties - datatype so the changed data type will not be propaged anymore to the replication model if the data type was changed on the source column.
It is working. The problem is that I need to do it one by one which is thousands of columns. Do you know how I can make this change for all columns at the one time?
Thank you,
Michal Skoda
Run the following code
set packages=ActiveModel.packages
for each pack in packages
for each tab in pack.tables
for each col in tab.columns
col.SourceReplication.delete
next
next
next
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From a quick scan of the metamodel help, it looks like you can do this with a script, by accessing:
Alternatively, access the list of tables in the model, and go directly to the replication properties.
You could also have a custom check that runs for each Column, checking the relevant SubReplication, with an AutoFix script to change it if it's wrong.
I hope I've interpreted the metamodel correctly!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi George,
thank you for your answer and hint.
I got to this point but now I have no idea how to find the DataType attribute. Could you please help me?
Thank you,
Michal Skoda
set replications=ActiveModel.replications
for each rep in replications
for each sub1 in rep.subreplications
next
next
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.