In this lesson, you set up a remote database for synchronization.
Run the following commands to create a remote database and start it running:
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 "eng=remote;dbf=remote.db;uid=dba;pwd=sql" |
Run the following SQL in Interactive SQL to create objects in the remote database.
First, create the table to be synchronized.
CREATE TABLE customer ( id unsigned integer primary key, name varchar( 256), phone varchar( 12 ) ); |
Next, 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, leave Interactive SQL running and connected to the database as you will be running more SQL against the database as you work through the tutorial.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |