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

SAP Sybase SQL Anywhere 16.0 » MobiLink - Getting Started » MobiLink tutorials » Tutorial: Using central administration of remote databases

 

Lesson 1: Creating a consolidated database

In this lesson, you set up a consolidated database. If you have an existing synchronization system, proceed to Lesson 2: Creating a MobiLink project.

Prérequis

This lesson assumes you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Using central administration of remote databases.

 Task
  1. Run the following commands to create directories to be used in this tutorial. The consolidated directory contains all the database and other files that would normally reside on your central server.

    md c:\cadmin_demo
    md c:\cadmin_demo\consolidated
  2. Create a SQL Anywhere consolidated database and an ODBC data source to connect to it.

    cd c:\cadmin_demo\consolidated
    dbinit -dba DBA,sql consol.db
    start dbsrv16 consol.db
    dbdsn -w cadmin_tutorial_consol consol -y -c "UID=DBA;PWD=sql;DBF=consol.db;SERVER=consol"
    cd ..
  3. Connect to the database in Interactive SQL. Run the following command:

    dbisql -c "DSN=cadmin_tutorial_consol"
  4. Execute the following statement in Interactive SQL to create MobiLink system tables and stored procedures using the syncsa.sql setup script. Replace C:\Program Files\SQL Anywhere 16\ with the location of your SQL Anywhere 16 installation.

    READ "C:\Program Files\SQL Anywhere 16\MobiLink\setup\syncsa.sql";
  5. Close Interactive SQL. You do not need to save your SQL statements.

Résultat

A SQL Anywhere database is created and you are connected to it.