An example

This section provides instructions for performing a simple update in the primary database, and then viewing the replicated changes in the replicate database.

  1. Log in to the primary Adaptive Server using the isql utility. For example:

    isql -Usa -P -SSAMPLE_PDS
    

    The isql prompt appears:

    >
    
  2. Choose the primary database. For example, enter:

    1> use pubs2
    2> go
    
  3. Grant the permission on authors table to public. For example, enter:

    1> grant all on authors to public
    2> go
    
  4. Verify that Chastity Locksley is listed in the au_lname and au_fname columns of the authors table. To view all author names in the authors table, enter:

    1> select au_fname, au_lname 
    2> from authors
    3> go
    

    Adaptive Server prints out the contents of the au_fname and au_lname columns.

  5. Change the name of Chastity Locksley to Chastity Hilton in the authors table. Enter:

    1> update authors
    2> set au_lname = “Hilton”
    3> where au_lname = “Locksley”
    4> go
    
  6. Verify that the change has taken place at the primary database. For example, enter:

    1> select au_fname, au_lname
    2> from authors
    3> where au_fname = “Chastity”
    4> go
    

    The primary Adaptive Server prints out “Chastity Hilton.”

  7. Log in to the replicate Adaptive Server using the isql utility. For example:

    isql -Usa -P -SSAMPLE_RDS
    

    The isql prompt appears.

  8. Choose the replicate database. For example, enter:

    1> use pubs2
    2> go
    
  9. Verify that the change has replicated to the replicate database. Enter:

    1> select au_fname, au_lname
    2> from authors
    3> where au_fname = “Chastity”
    4> go
    

    The replicate Adaptive Server prints out “Chastity Hilton.” Congratulations! You have a working replication system.