Create a directory for this tutorial (for example, OracleTut). Open a command prompt and navigate to OracleTut.
Type the following command:
dbinit remote.db
Verify the successful creation of the database by listing the contents of OracleTut.
While still at your OracleTut directory, type the following command on a single line:
dbdsn -w test_remote -y -c "uid=DBA;pwd=sql;dbf=path\OracleTut\remote.db;eng=remote"
Replace path with the location of your OracleTut directory.
Start Interactive SQL.
Choose Start > Programs > SQL Anywhere 10 > Interactive SQL.
Connect to the remote database.
Create remote tables, a publication, a user, and a subscription:
Copy the following code into Interactive SQL and execute it.
CREATE TABLE emp ( emp_id int primary key ,emp_name varchar( 128 ) ); CREATE TABLE cust( cust_id int primary key, emp_id int references emp ( emp_id ), cust_name varchar( 128 ) ); CREATE PUBLICATION emp_cust ( TABLE cust, TABLE emp ); CREATE SYNCHRONIZATION USER ml_user; CREATE SYNCHRONIZATION SUBSCRIPTION TO emp_cust FOR ml_user TYPE TCPIP ADDRESS 'host=localhost';
For more information about creating SQL Anywhere databases, see Initialization utility (dbinit).
For more information about creating an ODBC data source for a SQL Anywhere database, see Data Source utility (dbdsn).
For more information about Interactive SQL, see Interactive SQL utility (dbisql).
For information about creating the SQL Anywhere objects in this tutorial, see: