Skip Headers
Oracle® Database Lite Administration and Deployment Guide
Release 10.3

Part Number E12089-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

9 Offline Instantiation for Oracle Lite Mobile Clients

The Offline Instantiation (OLI) utility, which is only supported for Oracle Lite Mobile clients, enables Mobile administrators to prepare a batch package that includes the Oracle Lite Mobile client software and initial data for every Mobile user. The OLI package can be used to set up an Oracle Lite Mobile client with user-specific initial data within Oracle Database Lite. This procedure helps users avoid an expensive initial synchronization download to the Oracle Lite Mobile client.

Note:

OLI was modified significantly in Oracle Database Lite Release 10.3.0.2. Thus, if you are familiar with previous versions of OLI, you should re-read this chapter carefully to note what has changed. The most significant modification is that a client installtion is no longer required and must not be used.

The following sections discuss the Offline Instantiation feature.

9.1 Using Offline Instantiation to Distribute Multiple Oracle Lite Mobile Clients

You can enable your users to install their client using a distribution method, such as a CD, through the network, or email. To install the Oracle Lite Mobile client and perform the first synchronization with the initial data can be a performance issue. In this case, the administrator can pre-create either just the Mobile binaries or the Mobile binaries with the user ODB files (includes the data for the user) for the Oracle Lite Mobile client. The download of this package is faster than having each user perform the first synchronization on their device. Thus, this procedure helps users avoid an expensive performance hit when creating and synchronizing the Oracle Lite Mobile client for the first time.

Offline instantiation is a tool that enables an administrator to gather and package the Oracle Lite Mobile client binaries into a single directory. Offline instantiation is part of the Mobile Development Kit and is only supported on a Windows platform. Thus, you create all of your user distribution files on a Windows machine and you can only create multiple user distribution files for OC4J, Web-to-Go, Branch Office, Win32, and WinCE Oracle Lite Mobile clients. We recommend that you use the same Windows environment where a Mobile Server exists to create your distribution files.

When you have multiple users who use the same application, you set up a distribution for each user through the following steps:

  1. Create application: Using the Mobile Manager on the Mobile Server, the administrator sets up the application and the users for the Oracle Lite Mobile client distribution, as follows:

    1. Using the Mobile Manager on the Mobile Server, the administrator publishes the applications that are to be installed on the Mobile clients.

    2. The administrator creates all of the users for the Oracle Lite Mobile clients.

    3. The administrator grants access for these users to the applications that are to be downloaded for the distribution.

  2. Download the setup.exe file: On the Windows machine where the Mobile Development Kit is installed, download the Oracle Lite Mobile client binary (setup.exe) from Mobile Manager. Choose the platform and language that are appropriate for the Mobile clients that you are creating, except for the WinCE platform. To set up the Mobile client on the WinCE (PocketPC) device, choose the Oracle Lite WIN32. For more information, see Section 9.3, "Downloading the Oracle Lite Mobile Client SETUP Executable".

  3. Configure the oli.ini file: Configure the oli.ini file to tell the offline instantiation batch tool how to create the client distribution packages. See Section 9.4, "Configure How OLI Creates the Client Distribution Packages With the OLI Configuration File" for directions.

  4. Execute the OLI utility: Use the offline instantiation tool (OLI) to create and package the final client distribution packages for each user. See Section 9.5, "Using the OLI Engine to Create and Package the Client Distribution File" for directions.

  5. Distribute the package: Distribute the client distribution packages to each user to install on their client device. See Section 9.6, "Deploying Client Distribution Files on Client Machines" for directions.

9.2 Setting Up the Mobile Server Host and Mobile Development Kit Host

To set up the Mobile Server host and the Mobile Development Kit (MDK) host, perform the following steps:

Note:

Do not install an Oracle Lite Mobile client on the same machine as the Mobile Development Kit where OLI will be executed. If an Oracle Lite Mobile client is present, uninstall it before running OLI.
  1. Install the Mobile Server and Mobile Development Kit.

    The disk where Mobile Development Kit is installed must have sufficient free space as this is the staging area where all client binaries and ODB files are created before they are copied to the final package. The free space should exceed the total data (ODB files) to be packaged for all clients combined plus 200 MB. For example, if you want to package 50 clients where each uses 20 MB of data, then you need at least 1.2 GB of free space (50 x 20 MB + 200 MB = 1.2 GB).

  2. Start the Mobile Server.

  3. Create the appropriate users, publications, and subscriptions on the Mobile Server. Subsequent operations are carried out on the MDK host. The MDK host contains a sample OLI configuration file named oli.ini and the OLI batch file named oli.bat at the following location:

    ORACLE_HOME\Mobile\Sdk\bin

9.3 Downloading the Oracle Lite Mobile Client SETUP Executable

On the Windows machine where the Mobile Development Kit is installed, download setup.exe into an empty directory—such as C:\olisetup—from the Mobile Server setup page. The setup.exe can be downloaded from the following URL:

http://<mobile_server>:<port>/webtogo/setup

From the Setup UI, choose the appropriate Oracle Lite Mobile client, as follows:

The full path where you installed this setup.exe must be specified in the SETUP_PATH parameter in the OLI.INI file. Refer to Section 9.4.1, "SETUP" for more information on this parameter.

9.4 Configure How OLI Creates the Client Distribution Packages With the OLI Configuration File

The offline instantiation tool, OLI, reads the oli.ini file to determine how many users, the names of those users, the location of the Oracle Lite Mobile client binaries, and so on. Before you use the offline instantiation tool, make sure that you set up these parameters correctly.

The offline instantiation tool and configuration file is located in the Mobile Development Kit, under ORACLE_HOME\Mobile\Sdk\bin\. Thus, make sure that you have installed the Mobile Development Kit.

The following describes how to configure the OLI.INI file:

9.4.1 SETUP

The SETUP section contains the general configuration for OLI to create the client packages.

SETUP_PATH

Define the absolute location where you downloaded the client setup.exe, as described in Section 9.3, "Downloading the Oracle Lite Mobile Client SETUP Executable".

SETUP_PATH=C:\olisetup\setup.exe

MOBILE_SERVER

Provide the Mobile Server host and port that the Oracle Lite Mobile clients will connect to for synchronization. You can supply a host name or an IP address. The default port number is 80. Sync server must be running when OLI is launched.

MOBILE_SERVER=myhost.us.oracle.com:80

USE_SSL

If you are going to use SSL, set to YES. Default is NO.

USE_SSL=NO

JDBC_URL

Configure the JDBC URL to the Oracle database or Oracle RAC database where the Mobile Server Repository exists. For example, the following is for an Oracle database whose host, port and SID are myhost.us.oracle.com, 1521 and orcl.

JDBC_URL=jdbc:oracle:thin:@myhost.us.oracle.com:1521:orcl

If the Mobile Repository exists in an Oracle RAC database, then the JDBC URL for an Oracle RAC database can have more than one address in it for multiple Oracle databases in the cluster and follows this URL structure:

jdbc:oracle:thin:@(DESCRIPTION=
 (ADDRESS_LIST=
   (ADDRESS=(PROTOCOL=TCP)(HOST=PRIMARY_NODE_HOSTNAME)(PORT=1521))
   (ADDRESS=(PROTOCOL=TCP)(HOST=SECONDARY_NODE_HOSTNAME)(PORT=1521))
 )
 (CONNECT_DATA=(SERVICE_NAME=DATABASE_SERVICENAME)))

SCHEMA and PASSWORD

Configure the Mobile Server administration schema name and password for the Mobile Server Repository.

SCHEMA=MOBILEADMIN_SCHEMA
PASSWORD=MOBILEADMIN_PASSWORD

MAKEODB_METHOD

The MAKEODB_METHOD parameter defines how the client Oracle Lite databases are populated. The default and more performant option is JDBC, which transfers the data for all clients from the repository over a JDBC connection. Otherwise, you can configure SYNC, which uses the client-server synchronization for each individual client to generate the Oracle Lite databases.

MAKEODB_METHOD=JDBC

OLITE_JDBC_DRIVER

The OLITE_JDBC_DRIVER parameter defines the JDBC driver type for the connections to Olite client databases. Valid values are NATIVE and ODBC.

  • NATIVE: The default; use the Oracle Database Lite native driver.

  • ODBC: use the SUN JDBC-ODBC bridge.

OLITE_JDBC_DRIVER=NATIVE

MOBILECLIENT_ROOT

Discontinued for this release and following.

MOBILECLIENT_CD_ROOT

Discontinued for this release and following.

SHARED_CD_MODE

If set to YES, then only one generic client CD is generated and placed in the <OLI_CDS_ROOT>/Shared_CD. This CD only contains shared data. If set to NO, then each user has its own package created under the <OLI_CDS_ROOT>/<username>.

OLI_CDS_ROOT

The OLI package directory is a location where all the individual client packages are placed during the offline instantiation process. This directory must be located on a drive with adequate free disk space for all client databases. Configure this directory in the OLI_CDS_ROOT directory.

From this final directory—where OLI places all of the client distribution packages for each user—you can distribute the packages to each user.

OLI_CDS_ROOT=C:\OLI_CDS

DEVICE_TYPE

This specifies the type of device to which the client distribution packages are installed. You cannot install the packages to multiple platforms. Instead, choose one of the following:

  • WIN32: Windows 32

  • WTG: OC4J Web, Web-to-Go client, Branch Office

  • WCE: Windows CE (PocketPC)

DEVICE_TYPE=WIN32

THREADS

You can specify the number of threads OLI can use to process all of the users listed in the OLI.INI file. The more threads you allow, the more users can be processed concurrently.

9.4.2 USERS

The USERS section defines the users and their passwords. For each user, OLI creates a client distribution package that contains the Oracle Lite Mobile client binaries. The clients must have been created on the Mobile Server, as described in Section 9.1, "Using Offline Instantiation to Distribute Multiple Oracle Lite Mobile Clients". On each line, put the username and password, as follows:

[USERS]

CONSC1 MANAGER
CONSC2 MANAGER

For each user, a client distribution package is created.

9.4.3 Example of OLI.INI File

The following sample configuration file is available on the MDK host at ORACLE_HOME\Mobile\Sdk\bin\.

Note:

For this release and following, the MOBILECLIENT_ROOT and MOBILECLIENT_CD_ROOT parameters are no longer used for Offline instantiation.
#########################################################################
#        
# OLI.INI
# Oracle 10g Lite Offline Instantiation Configuration File
# Copyright © 1997-2008 Oracle Corporation.
# All Rights Reserved.
#
#########################################################################
#
# There are two sections whose names are enclosed in square 
# brackets: [SETUP] and [CLIENTS].
# Lines starting with a "#", ";", "--" or "//" are comments.
#
 
#
# Site specific parameters.
# The format for this section is <PARAMETER> = <VALUE>
#
[SETUP]
 
# Absolute path of setup downloaded from mobile server
#
SETUP_PATH=C:\olisetup\setup.exe 

#
# The mobile server name or IP. If on a port other than 80, append ":<port>".
# Sync server need be running when OLI is launched.
#
MOBILE_SERVER=hostname.domain:80
 
#
# If the mobile server port specified above is secure, set "USE_SSL" to "YES".
# Otherwise, use "NO".
#
USE_SSL=NO
 
#
# The mobile server database repository JDBC URL, mobileadmin schema and password
#
JDBC_URL=jdbc:oracle:thin:@hostname.domain:1521:orcl
SCHEMA=MOBILEADMIN_SCHEMA
PASSWORD=MOBILEADMIN_PASSWORD
 
#
# The method used to populate client databases. 
# Valid values are "SYNC" and "JDBC".
# "SYNC": use client-server synchronization to generate ODBs.
# "JDBC": use JDBC to transfer data from server repository to client.
# If clients subscribe to same data for some tables, "JDBC" is faster since they 
# are transferred only once for all clients.
#
MAKEODB_METHOD=JDBC
 
#
# The JDBC driver type for the connections to Olite client databases. 
# Valid values are "NATIVE" and "ODBC".
# "NATIVE": use Olite native driver.
# "ODBC": use SUN JDBC-ODBC bridge.
OLITE_JDBC_DRIVER=NATIVE
 
# If set to YES only one generic client CD is generated and place in 
# <OLI_CDS_ROOT>/Shared_CD. This CD only contains shared data. If set to NO,
# each user has its own package created under <OLI_CDS_ROOT>/<USERNAME>.
# 
SHARED_CD_MODE=NO
#
# The Directory where OLI puts the client instantiation packages.
# Under this directory, each instantiated client will have a sub directory
# which can be copied to a CD to be used for Mobile client installation 
# on the client machine. Client ODBs are included.
#
OLI_CDS_ROOT=C:\OLI_CDS
 
#
# The device type of the targeted Mobile client machines.
# Use "WIN32" for win32 native, 
# use "WTG" for oc4j web, webtogo client deployments and
# use "WCE" for Windows Mobile  
#
DEVICE_TYPE=WIN32
 
#
# The number of clients to be processed concurrently  
#
THREADS=1
 
#
# List of clients to be instantiated. The clients must have been created 
# on the Mobile Server.
# The format for this section is <CLIENTID> <PASSWORD> 
# Passwords are required
#
[USERS]
CONSC1 MANAGER
CONSC2 MANAGERCONSC3 MANAGER

9.5 Using the OLI Engine to Create and Package the Client Distribution File

The OLI engine reads the file oli.ini in the current directory for information related to configuration settings. Before launching the OLI engine, you must edit the oli.ini file, as described in Section 9.4, "Configure How OLI Creates the Client Distribution Packages With the OLI Configuration File". The OLI engine uses two repository tables— C$OLI_CLIENTS and C$OLI_SETUP—that store information related to resuming OLI tasks during interruptions or failures.

The OLI engine provides commands that enable you to create and populate the client database files, create packages for Mobile clients, and cleanup OLI tables. As a normal practice, execute them in the given order.

The OLI engine relies on a few Java classes and native libraries. To make the Java libraries and native libraries accessible to the OLI engine, the software contains a batch file named oli.bat, in which the necessary environment variables are set. Using the oli.bat file is recommended instead of directly using the Java class used by OLI, oracle.lite.sync.OLI_Win32.

To launch the OLI engine using the Command Prompt window, locate the directory ORACLE_HOME\Mobile\Sdk\bin and execute the oli.bat file at the Command Line.

Note:

Shut down the OC4J or Web-to-Go client prior to executing the oli.bat file.

This action displays the following usage information. NOTE: You execute only ONE of the following commands at a time: makeodb, package, cleanup, or checkstatus. Do NOT execute oli.bat with more than one of these commands. You will notice that the instructions show how to create the offline instantiation packages by executing oli.bat several times—once for each command.

Usage
 -----
 oli.bat [-g] [makeodb] [package] [cleanup] [checkstatus]

The -g command option for oli.bat turns on debugging.

Note:

Before executing the makeodb and package commands on WinCE or Win32 devices, ensure that you set the DEVICE_TYPE parameter to WCE, WTG, or Win32 in the oli.ini file.

To carry out OLI tasks, re-execute the command using the appropriate switches and arguments.

To build the client installation package, perform the following:

  1. Section 9.5.1, "Create and Populate Client Database Files with the MAKEODB Command"

  2. Section 9.5.2, "Package the Mobile Client Binaries with the Client Database Files with the PACKAGE Command"

  3. Section 9.5.3, "Clean Up the OLI Tables Before Executing OLI for Another Distribution"

  4. Section 9.5.4, "Check the Status of OLI Clients"

9.5.1 Create and Populate Client Database Files with the MAKEODB Command

Creates and populates the client Oracle Lite database .odb files. For each user defined in the [USERS] section of the oli.ini file, OLI creates the client database files for subscribed publications.

Usage

oli.bat [-g] makeodb

You can see the state of the client distribution files by executing the checkstatus command (see Section 9.5.4, "Check the Status of OLI Clients").

9.5.2 Package the Mobile Client Binaries with the Client Database Files with the PACKAGE Command

After creating the client database file, execute the package command, which packages up the client database file and the Mobile client binaries for each user defined in the [USERS] section in the oli.ini file.

Note:

During execution of this command, some setup dialogs will display to show information on the installation or download activities. This is part of the packaging and therefore should not be disturbed in any way even if it takes a few minutes.

If the SHARED_CD_MODE parameter is set to NO, then each client package is written to a subdirectory of the client; otherwise, a single shared package is created under directory named SHARED_CD under the directory defined in the OLI_CDS_ROOT parameter in the oli.ini file.

Usage

oli.bat [-g] package

After a client package is successfully processed, its status is changed to PACKAGE. You can see the state of the client distribution files by executing the checkstatus command (see Section 9.5.4, "Check the Status of OLI Clients").

9.5.3 Clean Up the OLI Tables Before Executing OLI for Another Distribution

The cleanup command cleans the OLI tables. The cleanup command re-creates the OLI tables. Execute this command before executing OLI for another distribution. There is no need to execute cleanup if you are not going to execute OLI for another distribution.

Usage

oli.bat [-g] cleanup

9.5.4 Check the Status of OLI Clients

Check the status of OLI clients with the checkstatus command. The initial status of a client is RESET. After the first client is processed successfully by makeodb, then its status changes from RESET to SLUG. After all of the other clients are replicated using the first client, their status changes from RESET to ODBMADE. Finally, when the OLI engine packages the client information into a directory, the status changes to PACKAGE.

Usage

oli.bat checkstatus

9.6 Deploying Client Distribution Files on Client Machines

Once you have the client packages ready, you can distribute them to your users either by putting the distribution files on a CD for them or by giving the user access to the distribution files over the network or through email. Whether you use the CD or provide your users access to the distribution directory, the client must have network access to the Mobile Server. When using OLI to register the client, the connection is used to propagate the initial synchronization of data.

When you finish packaging the users using the OLI command, a directory is created in the OLI_CDS_ROOT directory for each user. In each subdirectory, the distribution files, with a setup.exe, is written. The user can execute the setup.exe directly from this subdirectory over a network, you can zip up all of these files and send the ZIP file to the user over email, or you can copy all of the files to a CD for each user. Once the user has access to the distribution files, the user executes the setup.exe to install the Mobile client binaries.

The deployment process for WinCE clients are different from those of native Win32 clients and Web-to-Go clients. The following sections describe how the user would install the distribution files on these devices:

9.6.1 Deploy Win32 Native or Web-to-Go Client Distribution Package

To deploy on client devices for native Win32 platform or Web-to-Go clients, perform the following steps.

  1. After a successful server side Offline Instantiation process, each client is provided with a one-click installable package in the directory specified by the parameter named OLI_CDS_ROOT in the oli.ini file. The client sub-directory (package) is named after the client name. Provide each user with the client distribution package; for example, copy the client package to the client machine.

  2. On the client device, perform the following:

    1. If you have a Mobile client installed, uninstall the existing software.

    2. From the client distribution package, run setup.exe.

9.6.2 Deploy WinCE PocketPC Client Distribution Package

To deploy on PocketPC client devices for WinCE clients, perform the following steps.

  1. Install the Mobile client for Windows CE onto the CE device.

  2. After a successful server-side Offline Instantiation process, each client contains a package in the directory, which is specified by the parameter OLI_CDS_ROOT in the oli.ini file. The client sub-directory (package) is named after the client name. Provide each user with the client distribution package. Copy the client package to the ORACLE_HOME directory of the WinCE device.

  3. Perform a synchronization.

9.7 Creating a Single Package or Shared CD for Users That Share Data

OLI enables an administrator to prepare a CD for each user, which contains the Mobile client binaries and the user's data in ODB files. This process creates one package, or one CD, for each user and may have the following drawbacks:

  1. When there are a large number of users, the OLI process may be slow, resource intensive and error-prone.

  2. When most of the initial data is the same for all users and in read-only lookup tables, generating separate CDs is not necessary.

  3. Once a CD is used, the CD cannot be re-used for re-installation in cases like Mobile client corruption. If you try to re-use a CD, then a complete refresh may be triggered.

In shared CD mode, a generic CD is produced that contains the Mobile client binaries and shared data. The shared CD can be used and re-used by all users. Users need to specify the appropriate username and password during installation. The first synchronization after the install will bring down user-specific data and new shared data.

Follow the same directions as if you were creating the multiple packages, with the following differences:

  1. Set the Instance Parameter MAGIC_CHECK to NONSHARED. The MAGIC_CHECK parameter enables you to control the magic number checking of publication items. If magic check is enabled for a publication item and there is a mismatch between server and client magic numbers, the publication item receives a complete refresh.

    When you set this to NONSHARED, then the magic check is enabled only for non-shared publication items. See Section 5.5, "Configuring Data Synchronization For Farm or Single Mobile Server" on where the Instance parameters are modified in the Mobile Manager. See the full description of the MAGIC_CHECK parameter in Section A.7, "[CONSOLIDATOR]".

  2. Configure only a single username in the list of users at the end of the oli.ini file. See Section 9.4, "Configure How OLI Creates the Client Distribution Packages With the OLI Configuration File" for an example.

  3. Configure the SHARED_CD_MODE element in the oli.ini file to YES. See Section 9.4, "Configure How OLI Creates the Client Distribution Packages With the OLI Configuration File" for an example.

  4. After you complete the packaging of the offline instantiation by executing the oli.bat package command (see Section 9.5, "Using the OLI Engine to Create and Package the Client Distribution File"), then copy the contents of the <OLI_CDS_ROOT>/SHARED_CD directory onto a CD or provide shared access to the directory.

  5. Install the Mobile client by running the setup.exe located in the distribution package.

    Note:

    The client must have network access to the Mobile Server. When using OLI to register the client, the connection is used to propagate the initial synchronization of data.
  6. Modify the client password from the OLI package password to the actual user password.

    If the client installed is of WIN32 or WinCE type, perform the following:

    1. Run the msync.exe executable.

    2. Select the Tools->Sync Options. Select the Change Password checkbox. See Section 6.4.2.2, "Sync Options for MSync Tool" in the Oracle Database Lite Client Guide for more information.

    3. Modify the password, as follows:

      • New password: Provide the password of the Mobile user for this device. This is the current user that is installed on this device.

      • Confirm: Provide the same password as in the New password field.

      • Old password: Provide the password of the user that was supplied when creating the OLI package. This password is defined in the OLI.INI file.

      Click OK.

    If you have a Web-to-Go, OC4J Web or Branch Office client, perform the following:

    1. Login with the password of the user that was supplied when creating the OLI package.

    2. When the Change Password screen appears, modify the password as follows:

      • Current Password: Provide the password of the user that was supplied when creating the OLI package. This password is defined in the OLI.INI file.

      • New password: Provide the password of the Mobile user for this device. This is the current user that is installed on this device.

      • Confirm: Provide the same password as in the New password field.

      Click OK.

    3. Relogin with the new username and password.

  7. Click Sync to initiate your first synchronization for this client.

  8. After you have finished installing all of your clients and have performed the first synchronization for each of them, change the MAGIC_CHECK parameter in the Data Synchronization Instance parameter bakc to the default of ALL.