Contents Index Tutorial: Adaptive Server Anywhere replication using Sybase Central Setting up a consolidated database

SQL Remote User's Guide
  Tutorials for Adaptive Server Anywhere Users
    Tutorial: Adaptive Server Anywhere replication using Sybase Central

Preparing for the Sybase Central replication tutorial


This section describes the steps you need to take to prepare for the tutorial. These steps include the following:

To prepare for the tutorial

  1. Create a directory to hold the files you make during this tutorial; for example c:\tutorial.

    mkdir c:\tutorial
  2. 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
  3. Create the HQ 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

  1. Connect to the HQ database from Sybase Central, with a user ID of DBA and a password of SQL.

  2. Select the Tables folder of the HQ database in the left pane.

  3. From the File menu, choose New > Table and create a table named SalesRep using the Table Creation wizard.

  4. Add the following columns to the table (you can add a column by choosing File > Add Column):

    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.

  5. Save the table by choosing File > Save Table or pressing Ctrl+S.

  6. From the File menu, choose New > Table and create a table named Customer with the following columns:

    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.

  7. Save the table.

  8. In the Tables folder in the left pane, select the Customer table, then click the Foreign Keys tab in the right pane.

  9. From the File menu, choose New > Foreign Key. Using the wizard, add a foreign key to the Rep_key column of the SalesRep table. You can use the default settings for this foreign key.

You are now ready for the rest of the tutorial.


Contents Index Tutorial: Adaptive Server Anywhere replication using Sybase Central Setting up a consolidated database