Creating SQL Remote systems

Use the consolidated database to complete all SQL Remote administrative tasks. The following is a summary of the steps you need to complete to create a SQL Remote system.

 Create a SQL Remote system
  1. Choose your SQL Anywhere consolidated database or create a new SQL Anywhere database. The remote databases, which are also SQL Anywhere databases, are created from the consolidated database.

    When creating a new SQL Anywhere database, keep in mind how SQL Remote uses primary keys (there is the potential for duplicate primary keys when remotes replicate to the consolidated database). A good practice is to choose BIGINT with GLOBAL AUTOINCREMENT for the primary key column data type.

  2. Determine what data to replicate.

    To create an efficient replication system, you need to decide on the tables that you want to use, the columns from those tables, and finally the subset of rows to replicate. Only include the information that is needed.

  3. Create publications on the consolidated database.

    SQL Remote uses a publish and subscribe model to ensure that the correct information reaches its intended user. Arrange the data that you want to replicate into publications on the consolidated database.

  4. Create a publisher user on the consolidated database.

    A publisher is a user with PUBLISH authority.

  5. Create the remote users on the consolidated database.

    A remote user is used to uniquely identify a remote database.

    When you create a remote user, you define the message type to use when transporting the data and, optionally, you define how frequently to send the data.

  6. Subscribe the remote users to publications by creating subscriptions.

  7. Determine how the remote users can use the data.

    Remote users can always read their data. You can also allow them to update, delete, and insert data.

  8. Choose a method for resolving conflicts.

    Conflicts can occur during replication when your remote users update, delete, or insert data. You must implement methods for resolving conflicts.

  9. Deploy the SQL Remote system.

    Create the remote databases and install the appropriate software.

 See also

Publications and articles
User permissions
Subscriptions
Transaction log-based replication
Replication conflicts and errors
Update conflicts
Row not found errors
Referential integrity errors
Duplicate primary key errors
Row partitioning among remote databases
Disjoint data partitions
Overlap partitions
Unique identification numbers for remote databases