|
Ferdy,
You can do what you want to do, and you have two choices. You can either ue
the TO NEW clause or the TO EXISTING clause.
TO NEW FILENAME
---------------
If you use this clause in your CREATE TRANSFER statement, DDD will behave as
follows.
The first time the transfer executes, DDD will create the target database,
add to it the definitions of the tables you want replicated, and then transfer
a snapshot of the table data. By snapshot I mean all the data in the table
or (if you specified a selective WHERE clause) all the data in the table that
matches your selection criteria.
The second and subsequent executions of the transfer will not create a new
target database. These are called replication update transfers. They read the
changes which have occurred in the Rdb source database and apply those changes
to the target tables. The part that must have seemed confusing is that this
is an existing database at this point. True enough. The distinction between
TO NEW FILENAME and TO EXISTING FILENAME is relevant for the initial replication
transfer, not replication updates.
If you were performing EXTRACTION transfers, subsequent executions would indeed
create a new target database each time.
TO EXISTING FILENAME
--------------------
Alternatively, you can create your own target database to begin with and then
ask DDD to transfer into that existing database. The TO EXISTING FILENAME
option was added primarily when you want to transfer tables into someone else's
database -- a database that already exists.
"But if I specify "TO EXISTING FILENAME" in the to-clause, It fails in
the initial create."
Yes, that is because DDD expects the target database to exist. It does not
create one when the TO EXISTING FILENAME clause is used.
"So, should I alter the definition after the first successful transfer
to use 'TO EXISTING FILENAME'?"
I hope my explanation above makes it clear you should not alter the definition
after the first successful transfer.
"I was hoping that DDD will create the inital database and then update
with each transfer without any need to change the definition."
That's what happens when you use TO NEW FILENAME.
Claude
|