Skip Headers
Oracle® Database Lite Administration and Deployment Guide
10g (10.3.0)

Part Number B28922-01
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

8 Manage Your Branch Office

The following sections describe how to install, configure, manage and use the Mobile client for Branch Offices:

Note:

If you have installed Branch Office 10g Release 1 and want to use a later version, you must perform some upgrade steps that are listed in the Upgrade chapter of the Oracle Database Lite Getting Started Guide.

8.1 Introduction

The following sections introduce the Oracle Database Lite Branch Office:

8.1.1 What is the Branch Office?

The Branch Office provides access to the Branch Office database for up to 32 concurrent networked users. It enables the deployment of enterprise data and applications to geographically distributed sites that are running a Branch Office database. Each Branch Office database is centrally managed and supports multiple client connections, thereby eliminating local database administration tasks.

The Branch Office database synchronizes client data with the Oracle database at the company headquarters. Figure 8-1 illustrates the Branch Office database at a Branch Office location and its connection to the Oracle database server at the headquarters. Branch Office clients connect to the Branch Office database using either ODBC or JDBC connections. Clients access and update the Branch Office database, which contains a subset of the corporate database located at the company headquarters.

Figure 8-1 A Branch Office Overview

Description of Figure 8-1 follows
Description of "Figure 8-1 A Branch Office Overview"

8.1.2 How the Branch Office Works

Each Branch Office database supports up to 32 concurrent networked users, which are also known as Branch Office clients. These clients do not require a connection to their company headquarters and are allowed to work independently, without the corporate database.

The Branch Office also supports 32 concurrent local ODBC/JDBC connections to the Branch Office database. These local connections can be used for applications that perform background tasks, such as reporting, mass changes or updates, and bulk data loading.

As Figure 8-2 displays, Branch Office clients and local ODBC and JDBC applications can access the Branch Office database simultaneously. Multiple applications can execute on each client.

Figure 8-2 Accessing the Branch Office Database

Accessing the Branch Office database.
Description of "Figure 8-2 Accessing the Branch Office Database"

8.1.3 The Branch Office Manager

The Branch Office requires no local database administration and enables configuration and monitoring of Branch Office database services and users. Using the Web-based Branch Office Mobile Manager interface, the Branch Office Administrator centrally manages Branch Office operations. Furthermore, by using the Branch Office Mobile Manager, the administrator does not need to be physically present at each Branch Office.

8.1.4 Synchronizing Data with Headquarters

Data synchronization for Branch Office is centrally managed by the Branch Office Administrator. The Administrator synchronizes applications and data with the database located at headquarters through a TCP/IP connection. Synchronization between the Branch Office database and the headquarters database is executed through the Mobile Server. For more information on synchronizing data, see Chapter 5, "Managing Synchronization" and the Chapter 3 "Synchronization" in the Oracle Database Lite Developer's Guide.

The centralized management and data synchronization between the headquarters and its branches enables each Branch Office to synchronize data with the corporate database according to a pre-determined schedule. This allows for data replication based on geographic factors and alternate time zones.

Data specific to a given Branch Office is synchronized from the corporate database server to the Branch Office database. Each Branch Office database represents a single instance of replicated data and is the physical data repository that is accessed by Branch Office clients.

8.2 Branch Office Installation and Configuration

The following sections describe how to install and configure the Mobile client for Branch Office:

8.2.1 Terms and Concepts

Branch Office

A deployment concept of Oracle Database Lite designed for remote offices and Branch Office configuration.

Mobile client for Branch Office

Self-contained bundle of Oracle Database Lite libraries installed in the maching that contains the Branch Office.

Branch Office Administrator

Logical user responsible for the management of Branch Office users, data, and applications.

Branch Office Database

Multi-user of the Oracle Lite database.

Branch Office Application

Native or Java applications that access the Branch Office database over remote ODBC or JDBC connections.

Branch Office User

Logical user who is a client of the Branch Office database.

Branch Office Administrators

Group of Branch Office Administrators, each managed by the Mobile Manager.

8.2.2 Overview

To help understand and successfully implement a Branch Office setup, this section presents a sample setup that simulates a typical Branch Office environment. As Figure 8-3 displays, this example assumes that the Branch Office configuration has the following installations on three machines.

  1. M 1: One Mobile Server with a corporate Oracle database server.

  2. M 2: One or many Branch Office system(s) running on a Windows machine. This setup includes an embedded Web server, a multi user Oracle Lite database, and the Branch Office Mobile Manager. The Branch Office libraries are installed as part of the Mobile client for Branch Office.

  3. M 3: Up to the maximum of thirty-two Branch Office clients that host the Branch Office application (.exe) and use a remote ODBC/JDBC connection to access data in the Branch Office (multi-user) database located on M 2.

Figure 8-3 Branch Office Setup

This image illustrates the Branch Office setup.
Description of "Figure 8-3 Branch Office Setup"

8.2.3 Branch Office Pre-Installation Considerations

When you install the Branch Office Manager on the Windows machine, it creates the OracleDatabaseLite user account with the minimum set of privileges required to execute the Oracle Database Lite software. This prevents Oracle Database Lite Branch Office executing under the SYSTEM account, which has broad privileges within the system and can make the system vulnerable.

Both the 'Oracle Lite Multiuser Service' is created as well as the normal Web-to-Go service executes under the privileges of the OracleDatabaseLite user. The Oracle Lite Multiuser Server enables remote clients to connect to the Oracle Lite database.

Normally, when installed, the password for the OracleDatabaseLite user is randomly generated during the setup. You can either pre-configure this password before the Branch Office installation or modify it after the configuration. See Section 3.5.3, "Defining Password for OracleDatabaseLite User for Branch Office on Windows Machine" in the Oracle Database Lite Getting Started Guide.

8.2.4 Branch Office Installation

To install and configure the Branch Office, perform the following steps:

  1. Install the Mobile Server on the machine named M1.

  2. Using the Packaging Wizard, package the Branch Office application. During the application packaging process, select Oracle Lite Branch Office as your target platform. For more information on how to package your applications using the Packaging Wizard, refer to the Packaging Wizard chapter in the Oracle Database Lite Developer's Guide.

  3. Using the Mobile Manager Applications page, publish your Branch Office application. Select the Branch Office application that you need to publish and click Publish Application.

  4. Using the Mobile Manager Users page, create a Branch Office Administrator user and add this user to the Branch Administrators group. Provide administrator privileges to the Branch Office Administrator user.

  5. Using the Mobile Manager Applications page, click the published Branch Office application link. Select the Files tab and choose the application files that you want installed on the Branch Office Client (M3) machine. Click Make Public to specify that these files are public files.

  6. Provide access privileges to the Branch Office Administrator user. Using the Mobile Manager Applications page, select the Branch Office application that you need to provide user access privileges for and click Access. Grant access privileges by selecting the check box displayed against the Branch Office Administrator.

  7. Using the following URL, download and install the Mobile client for Branch Office onto the Branch Office machine (M2).

    http://<mobileserver>/webtogo/setup
    
    
  8. Using the following URL, open a browser window in the Branch Office machine (M2) and connect to the local Branch Office Web Server using the appropriate Branch Office Administrator user name and password:

    http://<branch_office_hostname>
    
    

    OR

    http://localhost
    

    Note:

    Normally the Branch Office Web Server is automatically started by the setup program. If not, open the Control Panel and choose Services. Start the service name Oracle Web-to-Go.
  9. At this stage, the Branch Office performs a complete synchronization process with the Mobile Server.

    1. A directory is created under the oldb40 directory with the name of your Branch Office Administrator user name. Under this directory, the Branch Office creates a database file with the same name as the Database Name provided in the Packaging Wizard as displayed in Figure 8-4.

      Figure 8-4 Database Panel - Packaging Wizard

      Database panel of the Packaging Wizard.
      Description of "Figure 8-4 Database Panel - Packaging Wizard"

    2. The Branch Office automatically creates a DSN entry in a <user name>_<database name> format.

      For example, if your Branch Office Administrator user name is Tom and your database name is BranchDB, the Branch Office creates a DSN entry named Tom_BranchDB.

  10. Open the Branch Office Mobile Manager and create a new Branch Office user.

    This stage marks the conclusion of the Branch Office Installation and Configuration process. In the next step, you must configure the Branch Office Client (M3).

  11. On the Branch Office Client machine (M3), open a browser window using the following URL and download the ODBC Driver program. This action creates a DSN entry in the Branch Office Client machine (M3) with the same name as the Database Name provided in the Packaging Wizard.

    http://<branch_office_hostname>/public/download
    
    

    Note:

    The DSN name on the Branch Office Client machine (M3) created by the ODBC Driver program is different from the DSN name on the Branch Office machine (M2).
  12. On the Branch Office Client machine (M3), open a browser and download the Branch Office application files using the following URL.

    http://<branch_office_hostname>/public/download
    
    
  13. On the Branch Office machine M3, add oladc12040.dll and olc12040.dll to your path.

  14. If the client created in step 11 is boUser, then when you connect from the client to the Branch Office, the remote JDBC connection string for the user named boUser is shown below.

    <boUser>/<boUser password>@jdbc:odbc:<DSN>
    
    

    The DSN name is the same as the name provided in step 9 in the <user name>_<database name> format in the Packaging Wizard. It can be located in the ODBC.INI file on the Branch Office Client machine (M3). The DSN points to the remote database listener located on the Branch Office machine (M2). The default port number for the database listener can be modified by modifying the port number in the SERVICE_PORT parameter in the POLITE.INI file. The default working directory can be modified with the SERVICE_WDIR parameter in the POLITE.INI file.

8.2.5 Enabling Branch Office on Windows XP Service Pack 2

To enable Branch Office on Windows XP Service Pack 2, you need to perform the following:

When you install Windows XP Service Pack 2, the ICF defaults to ON. In order for the Branch Office Server to work properly, you need to enable the Web-to-Go service and Branch Office executables access through the firewall. You can add these executables, as follows:

Go to the Windows Firewall control on your Windows machine. Select the Exception tab. Click Add Program. Browse for the following two programs and select the appropriate executables. Click OK.

  • %MOBILE_CLIENT_INSTALL%\bin\wtgsvc.exe

  • %MOBILE_CLIENT_INSTALL%\bin\olsv2040.exe

8.2.6 Changing Branch Office Listener Port Number and Working Directory

In order to change the Branch Office Server Listener port number or working directory, perform the following steps:

  1. Stop both the 'Oracle Web-to-go' and the 'Oracle Lite Multiuser' services.

  2. In the polite.ini file, edit the [All Databases] section to include the SERVICE_PORT or SERVICE_WDIR parameter, which points to the new listening port.

    For example:

    [All Databases]
    SERVICE_PORT=1160
    SERVICE_WDIR=C:\WINDOWS\SYSTEM32
    
    
  3. Start the 'Oracle Lite Multiuser' service first and then the 'Oracle Web-to-go' service.

Note:

The sequence in which services are started and stopped should be in the order as described above.

8.2.7 Accessing Branch Office or the Multi-User Service Using an ODBC or JDBC Driver

In order to access a Branch Office or the Multi-User Service—using either the ODBC or JDBC drivers—the Branch Office or Multi-User Service host where these reside must define a DSN for the host within the ODBC.INI file. This DSN is used by the remote clients to access the Branch Office or Multi-User service.

On the client, you can define the host where the Branch Office or Multi-User service resides in the URL with either the following:

  • Specify the DSN name in the URL.

  • If you specify NONE as the name of the DSN, then specify the Database and DataDirectory in the connection string where the values are the same as one of the DSNs in the ODBC.INI file.

  • If you have specified the Database or DataDirectory attributes in the connection string for type 2 or type 4 driver, then the value for either of the two attributes must be the same as the one defined in the ODBC.INI file, otherwise, the connection is rejected.

8.2.8 Changing the Language or Locale for Branch Office Client

If the user needs to change the locale for the default user-profile for a Branch Office client running in service mode, then perform the following:

If the Branch Office client is installed on Windows XP, then perform the following:

  1. Log on to the computer as the administrator.

  2. Open the "Regional and Language Options" in the Control Panel.

  3. Select the Advanced tab and select the Default user settings checkbox.

  4. Click Apply and restart the computer.

If the Branch Office client is installed on Windows 2000, then perform the following:

  1. Log on to the computer as the administrator, and then create a local user account.

  2. Log off as the administrator, and then log on to through the local user account that you just created.

  3. Change the locale of user to the desired locale within the Control-Panel->Regional Settings page.

  4. Log off as the local user, and then log back on as the administrator.

  5. Turn on the following option: Show hidden files and folders. In Windows Explorer, this option can be selected in the View tab of the Tools->Folder Options screen.

  6. Replace the current default user profile with the customized default user profile, as follows:

    1. Navigate to the Control-Panel->System.

    2. On the User Profiles tab, click the user profile that you just created, and then click Copy To.

    3. In the Copy profile to section, select the location and who is permitted to use this profile. Click Browse and select the \Documents and Settings\Default User folder for where the profile is to be copied. To set the permissions, then under the Permitted to use section, click Change for everyone. Click OK to save.

This modifies the locale for the default user-profile. At this point, you should install the Branch Office, which will reflect the new locale.

8.3 Architecture

The following sections describe the components of the multi-user architecture:

8.3.1 The Branch Office Environment

The Branch Office environment is comprised of two parts. As Figure 8-5 displays, they are the Branch Office Client component and the Branch Office Database component.

Figure 8-5 The Branch Office Environment

This image illustrates the Branch Office environment.
Description of "Figure 8-5 The Branch Office Environment"

8.3.1.1 The Branch Office Client

The Branch Office client machine executes both ODBC and Java based applications which access the Branch Office database (branch.odb).

Note:

The branch.odb file represents a sample database used throughout this chapter. Your database name may be different.

The Branch Office includes the following components.

ODBC Driver

The client ODBC driver (olcl2040.dll), supports ODBC-based client application connections for the Branch Office database. This driver connects ODBC applications to the Branch Office database. Based on the parameters specified in the client DSN, it searches for the Windows NT service running on the Branch Office database machine.

JDBC Driver

Java-based client applications connect to the Branch Office database through a JDBC connection. This JDBC driver (ORACLE_HOME/Mobile/Sdk/bin/olite40.jar) uses the ODBC driver for the connection. The ODBC driver makes the actual connection for the JDBC client application by first reading the DSN defined parameters and then by searching for the associated Windows NT service.

8.3.1.2 The Branch Office

The Branch Office contains the following components.

Branch Office Database

The Branch Office database machine is the interface between Branch Office clients and the database at company headquarters.

The Branch Office database (branch.odb) is a file created by the Mobile Server during synchronization. This database file is a subset of the headquarters database. Its tables are built on the headquarters database server. The Branch Office database file does not support Oracle Database Lite utilities, such as CREATEDB or REMOVEDB.

The Mobile Server Packaging Wizard defines and generates replication support for tables. For more information, see Chapter 6 "Using the Packaging Wizard" in the Oracle Database Lite Developer's Guide.

Note:

Snapshots are owned by SYSTEM. The password is the Branch Office administrator password.

Oracle Database Lite Listener Service

The Branch Office database machine contains the ODBC listener service named olsv2040.exe. This process creates a separate connection to the Branch Office database for every client network connection.

The listener service is dependent on Java. Before starting the listener service, the database machine must have the Sun Microsystems Java Runtime Environment (JRE). The JRE can be downloaded from the Java technology Web site.

The system PATH variable must include a path reference to this bin directory.

Mobile client for OC4J or Web-to-Go

The Mobile client for OC4J or Web-to-Go platform executes on the Branch Office database machine and acts as a Web server to run the Branch Office Mobile Manager. This feature allows the system administrator to access the Branch Office Mobile Manager and maintain a Branch Office database without being physically present at the Branch Office.

The Mobile client for OC4J or Web-to-Go enables users to deploy applications on client machines, using a browser that points to the Branch Office database machine. The Mobile client for OC4J or Web-to-Go publishes client applications as public files, so that client applications that use the Branch Office database can be downloaded directly from the Branch Office database machine. The Mobile client for OC4J or Web-to-Go executes as a background process to support browser based applications and distribution of public files.

8.3.1.3 Company Headquarters

The Oracle database resides at the company headquarters. The Mobile client for OC4J or Web-to-Go platform on the Branch Office database machine synchronizes all data changes in the Branch Office database with the Oracle database located at the headquarters.

8.3.2 Connecting Clients to the Branch Office Database Machine

The client applications connect with the Branch Office database machine through TCP/IP. The client driver, olcl2040.dll, facilitates this communication by connecting with the olsv2040.exe listener service on the Branch Office database machine. For every client connection, the listener service establishes a separate connection thread with the Branch Office database, branch.odb.

Establishing concurrent client connections requires that the listener service on the Branch Office database machine be started before the network connections are established.

8.3.2.1 ODBC Connection

To make a client connection to a Branch Office database, you must first set up an ODBC data source name (DSN) using the ODBC Administrator.

To connect an ODBC client application to a Branch Office database, an application must create a connection to the database. For example,

"UID=SYSTEM;PWD=MANAGER;DSN=POLITECL;DATABASE=BRANCH"

Table 8-1 describes the above database connection statement.

Table 8-1 Database Connection Statement Description

Parameter Description

UID

A valid database user.

PWD

A valid password to the database.

DSN

A data source name set up using the ODBC Administrator.

Database

The name of the local Branch Office database residing in the OLDB40/<username> folder in the ORACLE_HOME directory.


8.3.2.2 JDBC Connections

JDBC client applications make connections to the Branch Office database machine as given below.

Connect con=Drivermanager.getConnection (JDBC URL,user,password)

Table 8-2 describes the above Branch Office database connection statement.

Table 8-2 Branch Office Database Connection Description

Parameter Description

JDBC URL

The database URL. For example,

jdbc:polite@database_host_name:port_number:DSN

User

A valid database user.

Password

A valid password for the database.


Given below is a Java sample that describes connection for multiple users.

Connection conn = null
 
try{
 
   Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
                 conn = DriverManager.getConnection
                ("jdbc:Polite@DATA_SERVER:1160:POLITECL","SYSTEM","MANAGER");
} 
   catch(Exection e)  {
 
   System.out.println("An error has occurred.");
   System.out.println("Error accessing the Multi-user database");
   System.out.println(e)
   System.exit(0);}

The listener service must be started either manually or automatically before network connections can be established. The listener service can be started through the services application in the Control Panel, or through the Branch Office Mobile Manager.

8.4 Administration

The Administration facility is a Web-to-Go browser based application that enables the Branch Office Administrator to monitor and configure Branch Office database services and users. Navigate to the Mobile Workspace to administer the Branch Office applications and replication jobs. The Branch Office Administrator is a Mobile Server user created by the Mobile Server Administrator and must be included as a member of the group, "BRANCH ADMINISTRATORS."

The Administration facility enables user information maintenance capabilities for the Branch Office Administrator to centrally manage user access privileges to the Branch Office database. The Administration facility supports the following user management tasks.

The following sections provide instructions for using the Branch Office Mobile Manager:

8.4.1 Logging into the Branch Office Manager

The Branch Office Administrator can access the Branch Office Manager by clicking the Branch Office Manager link in the workspace.

The Branch Office Manager appears and defaults to the Branch Office Home page, as displayed in Figure 8-6.

Figure 8-6 Branch Office Home Page

This image displays the Branch Office home page.
Description of "Figure 8-6 Branch Office Home Page"

8.4.2 Using the Branch Office Manager

The Branch Office Manager contains the following pages. It enables the Branch Office Administrator to perform the administrative tasks described below.

  • Home - The Branch Office home page enables you to start and stop the listener service. It displays general information such as system status, system details such as the Java version and operating system, and database information such as version, listening port, and number of connected users.

  • Users - The Users page enables you to find and add users to the required database.

  • Connections - The Connections page displays connection details such as user name, connection duration, and the database path.

8.4.2.1 Updating Status Summary

The General section of the Branch Office home page provides the listener status to the Branch Office Administrator. The listener status can be changed by starting or stopping the database service. The database section displays the latest status of the Branch Office database. To update the Branch Office status summary, click the Refresh button on your browser. Starting or stopping the listener service also updates the status summary.

8.4.2.2 Starting the Database Service

The Branch Office Manager home page enables the Administrator to start the Windows NT Listener service using the Start Listener button.

8.4.2.3 Stopping the Database Service

The Branch Office home page enables the Administrator to stop the Windows NT Listener service using the Stop Listener button.

Note:

A Branch Office Administrator should check the Status Summary for connected users before stopping the service. Local database connections are not detected by the Branch Office Mobile Manager.

8.4.2.4 Viewing the Status of the Branch Office Database

The Branch Office Manager supports an unlimited number of database files. The General and Database section in the Branch Office Manager home page enable an Administrator to view the status of the Branch Office database and start or stop the windows service. The Connection page displays additional database information.

Table 8-3 describes the Branch Office home page.

Table 8-3 Branch Office Home Page Description

Label Function

Status

Branch Office status.

Since

Date and time since the Oracle Database Lite Branch Office system is up.

Database Version

Version number of the Oracle Database Lite Branch Office database.

Listening Port

The server port number that the Oracle Database Lite listener service uses.

Connected Users

Number of currently connected users.

Java Version

Version number of the Java Development Kit.

Operating System

Current operating system.


8.4.3 Managing Branch Office Users

To manage Branch Office users, login to the Mobile Server and navigate to the Users page. As Figure 8-7 displays, the Users page appears.

Figure 8-7 Branch Office Users Page

This image displays the Branch Office Users page.
Description of "Figure 8-7 Branch Office Users Page"

The Branch Office database does not need to be stopped to manage users and their access privileges. The Branch Office Administrator can add or delete users while other users are accessing the Branch Office database.

8.4.3.1 Creating Users

To create users, navigate to the Users page and click the Add User button under the Users section. The Add Users page appears. Enter the appropriate data in the corresponding fields and click the Save button.

Note:

You should not create a user named "System." This user name is reserved for Web-to-Go use.

8.4.3.2 Setting User Roles

After you create a new user, the Branch Office Mobile Manager automatically displays the Roles page. Using the Roles page, the Branch Office Administrator can assign user roles by selecting the available role boxes. As Table 8-4 describes, the Branch Office Administrator can assign the following roles.

Table 8-4 User Roles Description

Field Description

DBA

Database administrator privileges. When selected, users can add or remove users and add files to the database.

RESOURCE

RESOURCE privileges. Selecting this check box enables users to create their own sets of tables and relate them to their own schema.


8.4.3.3 Setting User Properties

The Roles Home page enables the Administrator to set user properties. To set user properties, click the Roles Home page link. Using this page, you can modify a user's password.

8.4.3.4 Setting User Privileges

The Privileges page enables the Branch Office Administrator to assign user privileges. To control user access to database tables, you can grant user privileges such as Select, Delete, Insert, and Update.

8.4.3.5 Finding Users

To find all users, click the Users link. Select the appropriate database name and click the Find button. To find a specific user, enter the user name and click the Find button.

To display a list of all users for the chosen database, enter the % sign and click the Find button. As Figure 8-8 displays, the Users page displays users that are associated with the chosen database.

Figure 8-8 Displaying Branch Office Users

This image displays existing Branch Office users.
Description of "Figure 8-8 Displaying Branch Office Users"

8.4.3.6 Removing a User

To remove a user, select the check box displayed against a user name and click the Delete button.

8.4.4 Managing Applications

The Applications tab enables the Branch Office Administrator to list all Web-to-Go applications that the Branch Office Administrator can access. Clicking an application link displays a list of files that comprise the application. The Branch Office Administrator can designate certain files as public, which means that they can be viewed and downloaded by the end users.

8.4.4.1 Downloading Public Files to Your Client

Making application files public enables the Branch Office to download those files and install them on the Branch Office clients.

To download and install a public file, Branch Office users must access the URL given below.

http://<branchofficemachine>/public/download

This URL lists all public files under their respective applications, as Figure 8-9 shows. Users can click the required file name and save it in their file system. After saving the file, users can install the application by running the self-extracting file.

Figure 8-9 Listing of Public Files

Downloading public files
Description of "Figure 8-9 Listing of Public Files"

For ODBC configuration, click the ODBC driver link. This downloads the setup.exe. After the file is downloaded, users must run the setup.exe.