In this lesson, you set up your MobiLink consolidated database.
Create a new working directory to store all the sample files created in this tutorial.
This tutorial assumes the path c:\mlreplay.
At a command prompt, change the working directory to c:\mlreplay.
This tutorial assumes all commands are run from this directory.
Run the following command to create a SQL Anywhere consolidated database named cons.db:
dbinit cons.db |
Run the following command to start the consolidated database:
dbeng12 cons.db |
Click Start » Programs » SQL Anywhere 12 » Administration Tools » ODBC Data Source Administrator.
Click the User DSN tab, and click Add.
In the Create New Data Source window, click SQL Anywhere 12 and click Finish.
Perform the following tasks in the ODBC Configuration For SQL Anywhere window:
Click the ODBC tab.
In the Data Source Name field, type cons.
Click the Login tab.
In the User ID field, type DBA.
In the Password field, type sql.
From the Action dropdown list, choose Connect To A Running Database On This Computer.
In the Server Name field, type cons.
In the Database Name field, type cons.
Click OK.
Close ODBC data source administrator.
Click OK on the ODBC Data Source Administrator window.
Connect to your consolidated database in Interactive SQL.
Run the following command:
dbisql -c "DSN=cons" |
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 12\ with the location of your SQL Anywhere 12 installation.
READ "C:\Program Files\SQL Anywhere 12\MobiLink\setup\syncsa.sql"; |
Interactive SQL applies syncsa.sql to your consolidated database.
Running syncsa.sql creates a series of system tables and stored procedures prefixed with ml_. The MobiLink server works with these tables and stored procedures in the synchronization process.
Execute the following SQL statement in Interactive SQL to create the T1 table:
CREATE TABLE T1 ( pk1 INTEGER, pk2 INTEGER, c1 VARCHAR(30000), PRIMARY KEY(pk1, pk2) ); |
Interactive SQL creates the T1 table in your consolidated database.
Close Interactive SQL.
Proceed to Lesson 2: Creating a MobiLink project.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |