This lesson assumes you have completed all preceding lessons. See Lesson 1: Creating and configuring the consolidated database.
In this lesson, you set up a remote database for synchronization.
Run the following commands to create and start a remote database.
cd.. md c:\remote cd c:\remote dbinit remote.db dbeng12 remote.db |
Open another instance of Interactive SQL and connect to remote.db.
dbisql -c "SERVER=remote;DBF=remote.db;UID=DBA;PWD=sql" |
Execute the following SQL statement in Interactive SQL to create the table to be synchronized.
CREATE TABLE customer ( id unsigned integer primary key, name varchar( 256), phone varchar( 12 ) ); |
Create a publication, MobiLink user, and subscription.
CREATE PUBLICATION p1 ( TABLE customer ); CREATE SYNCHRONIZATION USER u1; CREATE SYNCHRONIZATION SUBSCRIPTION my_sub TO p1 FOR u1 OPTION ScriptVersion='my_ver1'; |
After you have executed the SQL statements, leave Interactive SQL running and connected to the database as you will be running more SQL statements on the database as you work through the tutorial.
Proceed to Lesson 3: Synchronizing the remote database.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |