SQL Remote User's Guide
Tutorials for Adaptive Server Anywhere Users
Tutorial: Adaptive Server Anywhere replication using Sybase Central
This section describes the steps you need to take to prepare for the tutorial. These steps include the following:
Create the directories and databases required for the tutorial.
Add the tables to the consolidated database.
To prepare for the tutorial
Create a directory to hold the files you make during this tutorial; for example c:\tutorial.
mkdir c:\tutorial
Create a subdirectory for each of the two user IDs in the replication system, to hold their messages. Create these subdirectories using the following statements at a system command line:
mkdir c:\tutorial\HQ mkdir c:\tutorial\field
Create the HQ database:
Start Sybase Central.
In the left pane, select the Adaptive Server Anywhere 9 plug-in.
In the right pane, click the Utilities tab.
Double-click Create Database in the right pane.
The Create Database wizard appears.
Create a database with filename c:\tutorial\HQ.db.
Use the default settings for this database.
An Adaptive Server Anywhere database is simply a file, which can be copied to other locations and computers when necessary.
The next step is to add a pair of tables to the consolidated database.
To add tables to the consolidated database
Connect to the HQ database from Sybase Central, with a user ID of DBA and a password of SQL.
Select the Tables folder of the HQ database in the left pane.
From the File menu, choose New
Add the following columns to the table (you can add a column by choosing File
Key | Column | Data Type | Size/Prec |
---|---|---|---|
Primary key | Rep_key | char | 5 |
Name | char | 40 |
You do not need to use the Column property sheet.
Save the table by choosing File
From the File menu, choose New
Key | Column | Data Type | Size/Prec |
---|---|---|---|
Primary key | Cust_key | char | 10 |
Name | char | 40 | |
Rep_key | char | 5 |
Again, you do not need to use the property sheets.
Save the table.
In the Tables folder in the left pane, select the Customer table, then click the Foreign Keys tab in the right pane.
From the File menu, choose New
You are now ready for the rest of the tutorial.