Contents Index Lesson 7: Add Replication Server information to the replicate database Lesson 9: Set up Replication Server

ASA Database Administration Guide
  Replicating Data with Replication Server
    Tutorial: Replicate data using Replication Server

Lesson 8: Create the tables for the replicate database


The replicate site database needs to have tables to hold the data it receives. Now is a good time to create these tables. As long as the database elements are in place, no extra statements are necessary for them to act as a replicate site in a Replication Server installation. In particular, you do not need to set the REPLICATE flag to ON, which is necessary only at the primary site.

Replication Server allows replication between tables and columns with different names. As a simple example, however, create a table in the replicate database identical in definition to that in the primary database (except for the REPLICATE flag, which is not set to ON in the replicate database). The table creation statement for this is:

CREATE TABLE news (
   ID int,
   AUTHOR char( 40 ) DEFAULT CURRENT USER,
   TEXT char( 255 ),
   PRIMARY KEY ( ID, AUTHOR )
)
go

For the tutorial, the CREATE TABLE statement must be exactly the same as that at the primary site.

You must ensure that the users dbmaint and sa can access this table without specifying the owner name. Also, these user IDs must have SELECT and UPDATE permissions on the table.


Contents Index Lesson 7: Add Replication Server information to the replicate database Lesson 9: Set up Replication Server