Contents Index ODBC data sources Databases

MobiLink Synchronization User's Guide
  Tutorial: Using MobiLink with an Oracle 8i Consolidated Database
    Lesson 1: Create your databases

MobiLink system tables


MobiLink comes with a script called syncora.sql, located in the MobiLink\setup subdirectory of your SQL Anywhere installation. Syncora.sql contains SQL statements, written in Oracle SQL, to prepare Oracle databases for use as consolidated databases. It creates a series of system tables, triggers, and procedures for use by MobiLink. The system tables are prefaced with ML_. MobiLink works with these tables during the synchronization process.

Create MobiLink system tables within Oracle

  1. Start SQL Plus. Choose Start > Programs > Oracle - OraHome81 > Application Development > SQL Plus.

    Connect to your Oracle database by using Oracle SQL Plus. Log on using the system schema with password manager.

  2. Run syncora.sql by typing the following command:

    @path\syncora.sql;

    where path is the MobiLink\setup subdirectory of your SQL Anywhere 9 installation. If there are spaces in your path, you should enclose the path and filename in quotation marks.

To verify that the system tables are installed

  1. Start SQL Plus. Choose Start > Programs > Oracle - OraHome81 > Application Development > SQL Plus.

  2. Run the following SQL statement to yield a listing of the MobiLink system tables, procedures, and triggers:

    SELECT object_name
    FROM all_objects
    WHERE object_name
    LIKE 'ML_%';

    If all of the objects shown in the following table are included, you can proceed to the next step.

OBJECT_NAME
ML_ADD_CONNECTION_SCRIPT

ML_ADD_DNET_CONNECTION_SCRIPT

ML_ADD_DNET_TABLE_SCRIPT

ML_ADD_JAVA_CONNECTION_SCRIPT

ML_ADD_JAVA_TABLE_SCRIPT

ML_ADD_LANG_CONNECTION_SCRIPT

ML_ADD_LANG_TABLE_SCRIPT

ML_ADD_TABLE_SCRIPT

ML_ADD_USER

ML_CONNECTION_SCRIPT

ML_CONNECTION_SCRIPT_TRIGGER

ML_SCRIPT

ML_SCRIPTS_MODIFIED

ML_SCRIPT_TRIGGER

ML_SCRIPT_VERSION

ML_SUBSCRIPTION

ML_TABLE

ML_TABLE_SCRIPT

ML_TABLE_SCRIPT_TRIGGER

ML_USER

Note 
If any of the objects are missing, the procedure you just completed was not successful. In this case, you need to review the MobiLink error messages to see what went wrong; correct the problem; and then drop the MobiLink system tables as follows. However, do not drop system tables if there are any tables starting with ML_ other than the ones listed above.

To drop the MobiLink system tables

The remote data source 

To initialize your remote database

  1. Open a command prompt and navigate to your OracleTut directory, for example c:\OracleTut. Run the following command line:

    dbinit remote.db
  2. Verify the successful creation of the database by getting a listing of the contents of this directory. The file remote.db should appear in the directory listing.

To create an ODBC data source for the remote database

To verify your new data source

  1. Choose Start > Programs > Sybase SQL Anywhere 9 > Adaptive Server Anywhere > ODBC Administrator.

    The ODBC Data Source Administrator appears.

  2. Click the User DSN tab.

  3. Select test_remote from the list of data sources and click Configure.

  4. Test test_remote by clicking the Test Connection button.

  5. Click OK to close the ODBC Data Source Administrator.


Contents Index ODBC data sources Databases