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 version 10g Release 2, you must perform some upgrade steps that are listed in the Upgrade chapter of the Oracle Database Lite Getting Started Guide. |
The following sections introduce the Oracle Database Lite 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 10-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.
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 10-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.
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.
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 6, "Managing Synchronization" and the Synchronization chapter 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.
The following sections describe how to install and configure the Mobile client for Branch Office:
Section 10.2.4, "Enabling Branch Office on Windows XP Service Pack 2"
Section 10.2.5, "Changing Branch Office Listener Port Number"
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.
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.
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 10-3 displays, this example assumes that the Branch Office configuration has the following installations on three machines.
M 1: One Mobile Server with a corporate Oracle database server.
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.
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.
To install and configure the Branch Office, perform the following steps.
Install the Mobile Server on the machine named M1.
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.
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.
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.
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.
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.
Using the following URL, download and install the Mobile client for Branch Office onto the Branch Office machine (M2).
http://<mobileserver>/webtogo/setup
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. |
At this stage, the Branch Office performs a complete synchronization process with the Mobile Server.
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 10-4.
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
.
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).
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). |
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
On the Branch Office machine M3, add oladc12040.dll
and olc12040.dll
to your path.
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.
When you install Windows XP Service Pack 2, the Internet Connection Firewall (ICF) defaults to ON. In order for the Branch Office Server to work properly, you either need to turn the ICF OFF or enable port 1531 within the ICF. To enable port 1531, go to the Windows Firewall control on your Windows machine. Select the Exception tab. Click Add Port. Add port 1531 with any name.
In order to change the Branch Office Server Listener port number, perform the following steps:
Stop both the 'Oracle Web-to-go' and the 'Oracle Lite Multiuser' services.
In the polite.ini
file, edit the [All Databases]
section to include the SERVICE_PORT
parameter, which points to the new listening port.
For example:
[All Databases] SERVICE_PORT=1531
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. |
The following sections describe the components of the multi-user architecture:
The Branch Office environment is comprised of two parts. As Figure 10-5 displays, they are the Branch Office Client component and the Branch Office Database component.
The Branch Office client machine executes both ODBC and Java based applications which access the Branch Office database (branch.odb
).
Note: Thebranch.odb file represents a sample database used throughout this chapter. Your database name may be different. |
The Branch Office includes the following components.
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.
Java-based client applications connect to the Branch Office database through a JDBC connection. This JDBC driver (OLITE_HOME
/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.
The Branch Office contains the following components.
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 the Packaging Wizard chapter in the Oracle Database Lite Developer's Guide.
Note: Snapshots are owned bySYSTEM . 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 JavaSoft 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.
The Mobile Client for 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 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 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 Web-to-Go executes as a background process to support browser based applications and distribution of public files.
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.
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 10-1 describes the above database connection statement.
Table 10-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. |
JDBC client applications make connections to the Branch Office database machine as given below.
Connect con=Drivermanager.getConnection (JDBC URL,user,password)
Table 10-2 describes the above Branch Office database connection statement.
Table 10-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:1531: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.
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:
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 10-6.
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.
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.
The Branch Office Manager home page enables the Administrator to start the Windows NT Listener service using the Start Listener button.
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. |
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 10-3 describes the Branch Office home page.
Table 10-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. |
To manage Branch Office users, login to the Mobile Server and navigate to the Users page. As Figure 10-7 displays, the Users page appears.
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.
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. |
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 10-4 describes, the Branch Office Administrator can assign the following roles.
Table 10-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. |
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.
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.
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 10-8 displays, the Users page displays users that are associated with the chosen database.
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.
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 10-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.
For ODBC configuration, click the ODBC driver link. This downloads the setup.exe
. After the file is downloaded, users must run the setup.exe
.