Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » Replicating Data with Replication Server » Tutorial: Replicate data using Replication Server

Lesson 5: Add Replication Server information to the primary database Next Page

Lesson 6: Create the table for the primary database


In this section, you create a single table in the primary site database, using isql. First, make sure you are connected to the primary site database:

isql -U DBA -P sql -S PRIMEDB

Next, create a table in the database:

CREATE TABLE news (
  ID INT,
  AUTHOR CHAR( 40 ) DEFAULT CURRENT USER,
  TEXT CHAR( 255 ),
  PRIMARY KEY ( ID, AUTHOR )
)
go
Identifier case sensitivity

In SQL Anywhere, all identifiers are case insensitive. In Adaptive Server Enterprise, identifiers are case sensitive by default. Even in SQL Anywhere, ensure the case of your identifiers matches in all parts of the SQL statement to ensure compatibility with Adaptive Server Enterprise.

In SQL Anywhere, passwords are always case sensitive. User IDs, being identifiers, are case insensitive in all SQL Anywhere databases.

For more information, see CREATE DATABASE statement.

For news to act as part of a replication primary site, you must set REPLICATE to ON for the table using an ALTER TABLE statement:

ALTER TABLE news
REPLICATE ON
go

This is equivalent to running the sp_setreplicate or sp_setreptable procedure on the table in Adaptive Server Enterprise. You cannot set REPLICATE ON in a CREATE TABLE statement.