Re: Managing Replication
Posted in 1999
Madison:
Suppose you do the following:
On Primary:
create table tab1 (
col1 integer,
col2 char(1)
);
On Target:
create table tab1 (
col1 integer,
col2 char(1)
);
Next, you define replication: cdr define repl repl01 "P ..." R ..." and
then "cdr start repl repl01"
Now your replication set in defined.
Next, you realize that you need to add a third column. So, do the
following steps:
# I do a delete instead stop. When I used stop, IDS thought the table was
still owned by replication. Hum????
cdr delete repl repl01
# Do this for both Primary and Target databases. col3 will not contain
data at this point.
alter table tab1 add (col3 char(1));
# Redefine your replication set and you are off to the races.
cdr define repl repl01 "P ..." R ..." and then "cdr start repl repl01"
Since my original message, I have run into another unknown. I am trying
to delete the above replicate set. I do "cdr delete repl ..." from the
Primary instance. Which should remove the replication definition from the
Target instance. Correct assumption?? When I do the "cdr defin repl ...",
ER thinks the table is already defined in the Target but "cdr list repl"
does not list the replication set. Any thoughts?
TIA,
Steve Romankiw
Madison Pruet wrote:
> Yes - If you have to alter the table, you must first stop replication
> for that table, make the alteration, and then redefine the replication
> for that table.
>
> Just a question - what type of alterations do you have to do with the
> replicated table?
>
> Steve Romankiw wrote:
>
> > I have recently gotten my feet wet with ER. In the docs, I have not
> > been able to find tips for incorporating DDL changes into your
> > replication sets.
> >
> > What tips/tricks do you use when making DDL changes to your
> > environment? Do you need to do a "cdr delete repl", alter the
> > primary/target tables, and then "cdr define repl"?
> >
> > My configuration is fairly simple:
> >
> > o A few tables, no BLOBS
> > o Primary -Target topology
> > o IDS v7.30
> > o Solaris 2.6
> >
> > Thanks.
> >
> > Steve Romankiw