Chapter 4. Tutorialsfor Adaptive Server Anywhere Users
mkdir c:\tutorial\hq
mkdir c:\tutorial\field
Thenext step is to add a pair of tables to the consolidated database.
Toadd the tables to the consolidated database
1. Connect to
hq.db
fromInteractive SQL with a user ID of DBA and a
passwordof SQL.
2. Execute the following CREATE TABLE statement to create the
SalesReptable:
CREATE TABLE SalesRep (
rep_key CHAR(12) NOT NULL,
name CHAR(40) NOT NULL,
PRIMARY KEY ( rep_key )
);
3. Execute the following CREATE TABLE statement to create the
Customertable:
CREATE TABLE Customer (
cust_key CHAR(12) NOT NULL,
name CHAR(40) NOT NULL,
rep_key CHAR(12) NOT NULL,
FOREIGN KEY REFERENCES SalesRep,
PRIMARY KEY ( cust_key )
);
Youare now ready for the rest of the tutorial.
Set up the consolidated database
Thissection of the tutorial describes how to set up the consolidated database
ofa simple replication system.
Yourequire DBA authority to carry out this task.
Create a SQL Remote message type
Allmessages sent as part of replication use a message type. Amessage type
descriptionhas two parts:
Amessage link supported by SQL Remote. Inthis tutorial, we use the
FILElink.
Anaddress for this message link, to identify the source of outgoing
messages.
41