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

SQL Anywhere 12.0.0 (中文) » MobiLink - 入门 » MobiLink 教程 » 教程:使用 ScriptVersion 扩展选项更改模式

 

第 3 课:同步远程数据库

现在应建立工作同步系统。在本课中,将通过插入某些数据和同步对其进行测试。

 ♦  同步远程数据库
  1. 使用连接到统一数据库的 Interactive SQL 实例执行以下 SQL,以便在 customer 表中插入行。

    INSERT INTO customer VALUES( 100, 'John Jones', '519-555-1234' );
    COMMIT;
  2. 使用连接到远程数据库的 Interactive SQL 实例执行以下 SQL,以便在 customer 表中插入行。

    INSERT INTO customer VALUES( 1, 'Willie Lowman', '705-411-6372' );
    COMMIT;
  3. 现在,可通过运行以下命令同步:

    dbmlsync -v+ -ot sync1.txt -c uid=dba;pwd=sql;eng=remote -s my_sub -k

可通过比较远程数据库和统一数据库中的 customer 表的内容,确认同步是否成功。也可以查看 dbmlync 日志 sync1.txt,并检查错误。