Sybase DC38133-01-0902-01 Microscope & Magnifier User Manual


 
Chapter 4. Tutorials for Adaptive Server Anywhere Users
mkdir c:\tutorial\hq
mkdir c:\tutorial\field
The next step is to add a pair of tables to the consolidated database.
To add the tables to the consolidated database
1. Connect to
hq.db
from Interactive SQL with a user ID of DBA and a
password of SQL.
2. Execute the following CREATE TABLE statement to create the
SalesRep table:
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
Customer table:
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 )
);
You are now ready for the rest of the tutorial.
Set up the consolidated database
This section of the tutorial describes how to set up the consolidated database
of a simple replication system.
You require DBA authority to carry out this task.
Create a SQL Remote message type
All messages sent as part of replication use a message type. A message type
description has two parts:
A message link supported by SQL Remote. In this tutorial, we use the
FILE link.
An address for this message link, to identify the source of outgoing
messages.
41