Importing data by replication
226
Space for deletions
When you use the DELETE statement, you may need to add space to your
database, due to the way Adaptive Server IQ stores versions of data pages. For
details, see “Overlapping versions and deletions”.
When you use
DROP TABLE or TRUNCATE TABLE, you do not need to add
space, as no extra version pages are needed.
Importing data by replication
If you need to update your IQ data frequently from an Adaptive Server
Enterprise database, you may want to consider setting up a replication
environment. In this environment, you can use the Sybase Distribution
Director to automate the process of replicating data from an Adaptive Server
Enterprise database into an Adaptive Server IQ database.
Distribution Director establishes a two-phase process in which transactions
that occur on the source database—the Adaptive Server Enterprise database—
are repeated on the Adaptive Server IQ database. To make this process work,
you need:
• An operating Replication Server system, which includes a special database
called the Replication Server System Database (RSSD). This database
contains replication definitions that describe the transactions in the source
database, and how they should be replicated to the replicate databases.
• A specially prepared replicate database on an Adaptive Server Enterprise
database. This replicate database serves as a staging area for the migration
into your IQ database.
• Your IQ database set up with the appropriate tables for the data to be
replicated.
Here is a summary of how it works:
1 In Phase 1, the Replication Server replicates transactions from the source
database to the RSSD on a continuous basis.
2 In Phase 2, the Adaptive Server IQ staging migration is executed, to
transfer the replicated transactions from the RSSD into the IQ database.
This two-phase approach overcomes differences between the way Adaptive
Server Enterprise and Adaptive Server IQ store and update data. It also allows
you to schedule insertions into your database for lower usage periods, and
avoids conflicts with other insertions or loads to the same tables.