In this lesson, you create a SQL Anywhere remote database, create a synchronization publication, a user, and a subscription. You also create the command file for the Listener, and then start the Listener.
At a command prompt, navigate to the directory where you want to create the database.
Type the following command to create the database:
dbinit c:\MLsis\SIS_CarDealer_LP_DBLSN_REM.db |
Type the following command to start the database:
dbeng11 c:\MLsis\SIS_CarDealer_LP_DBLSN_REM.db |
Generate the remote database schema.
Click Start » Programs » SQL Anywhere 11 » Sybase Central.
In the left pane, click SQL Anywhere 11.
Click File » Connect.
Click the Identification tab.
In the User ID field, type DBA.
In the Password field, type sql.
Click the Database tab.
In the Server Name field, type SIS_CarDealer_LP_DBLSN_REM.
Click OK.
Click File » Open Interactive SQL.
Execute the following command to create the Dealer table:
CREATE TABLE Dealer ( name VARCHAR(10) NOT NULL PRIMARY KEY, rating VARCHAR(5), last_modified TIMESTAMP DEFAULT TIMESTAMP ) COMMIT; |
Execute the following commands to create a synchronization publication, user, and subscription:
CREATE PUBLICATION CarDealer(TABLE DEALER WHERE 0=1) CREATE SYNCHRONIZATION USER test_mluser OPTION ScriptVersion='CarDealer' CREATE SYNCHRONIZATION SUBSCRIPTION TO CarDealer FOR test_mluser SET OPTION public.ml_remote_id = {remote_id} COMMIT; |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |