Installation and User's Guide


Prerequisites

The following hardware is required for DB2 Everyplace:

You must have installed one of the following operating systems:

Download the IBM JDK from www.ibm.com/developerworks/java/jdk/.

For UNIX you must install a ksh shell before you install DB2 Universal Database (most UNIX systems have the ksh shell by default).

To use DB2 Everyplace, you must install the following software:


Installing DB2 Everyplace on a Windows workstation

To install DB2 Everyplace on a Windows workstation:

  1. Insert the DB2 Everyplace CD-ROM in your CD-ROM drive. The DB2 Everyplace installation program opens.

    If the DB2 Everyplace installation program does not open, begin installation by double-clicking the Setup.exe file located on the DB2 Everyplace CD-ROM.

    If you have downloaded the installation program from the Web, run DB2Everyplacexxx.exe, where xxx is the 3-letter language code. When you execute this file, the installation files are extracted to your temporary directory and the setup program runs automatically.

  2. Select the language to install in the Choose Setup Language window and click OK.
  3. Click Installation prerequisites to view important installation information.
  4. Click Release Notes to view the latest release information included with the product.
  5. Click Install to begin installing DB2 Everyplace.
  6. Read the Software License Agreement and click Accept.
  7. Select the products to install:

    If you selected to install DB2 Everyplace Sync Server, the installation program checks to ensure that you have installed DB2 Universal Database. If the installation program cannot detect DB2 Universal Database, you will be prompted to install it. The Sync Server installation will abort if it finds an incorrect version of DB2 Universal Database and if the edition of DB2 Everyplace that you are installing does not include the latest version of DB2 Universal Database.

    Two new environment variables are included with the Sync Server:

    After you complete the installation, select View additional setup tasks information and Create Sync Server sample databases for a brief tutorial on how to use the DB2 Everyplace Sync Server. The Create Sync Server sample databases program creates sample data and mirror tables for use with the tutorials. See the DB2 Everyplace Sync Server Administration Guide for information about how to get started using the Sync Server to replicate enterprise data to the mobile device and synchronize this data as changes are made.

    Note:DB2 Everyplace Sync Server is included only with DB2 Everyplace Enterprise Edition.
  8. Click Next.
  9. Optional: If you plan to use the DB2 Everyplace Mobile Application Builder, download and install the DB2 Everyplace Mobile Application Builder. DB2 Everyplace Mobile Application Builder is available from the DB2 Everyplace Web site (http://www.ibm.com/software/data/db2/everyplace/downloads.html). DB2 Everyplace Mobile Application Builder is a rapid application development tool for Palm OS applications.
  10. Optional: Complete the IBM Product Registration.

After installing DB2 Everyplace to the Windows workstation, see Chapter 3, Installing DB2 Everyplace on a client for instructions on how to install the DB2 Everyplace libraries and sample files to a mobile, embedded, or emulated device.

Post installation tasks on Windows

Before you can use your mobile device to access DB2 databases, you must create a mid-tier server and set up replication for your databases. The mid-tier server, which is also referred to as a mirroring server, is used to cache data that is received when you synchronize from a mobile device. One mirroring server is used by many mobile devices to synchronize data. The data or updates that are destined for a DB2 database are held on the mirroring server until replication is performed between the database and the mirroring server. Replication can be set up to occur at regular intervals or done on demand. More detailed information about propagating data can be found in the DB2 Universal Database Replication Guide and Reference : .

The following sections tell you how to set up a mid-tier server, how to set up a sample database, how to enable replication, and what to do to test the servlet

Creating a mid-tier server

If your source database exists on a different machine than the mid-tier server, you need to link to it from the DB2 Universal Database (UDB) Control Center. In the Control Center, you add the host system, create an instance for the host system, and then add the database to the host system using an alias for the name of the mid-tier database if necessary. You can create the mid-tier database from a DB2 command line (use the command: db2 create db), or use the Database Create wizard in the DB2 UDB Control Center. To create a mid-tier database on your local machine on the Sync Server instance, both the mid-tier database and the Sync Server control database (DSYCTLDB) must use the same code page.

Setting up sample databases

On Windows operating systems, if you did not specify that you want to create the sample databases when you installed DB2 Everyplace, you can create the samples later by navigating to %DSYINSTDIR\Sample and executing the dsysample.exe file. The DB2 Everyplace Sync Server samples include

Enabling Replication

To replicate between the mirroring server and DB2 databases, you must create a table subscription for your databases. Replication is set up automatically when you install the Sync Server. If you want more information, see the DB2 Everyplace Sync Server Administration Guide :

Testing the relational data Sync Server servlet

To ensure that the Sync Server servlet to ensure that it can successfully communicate with clients. It is not necessary to have any clients installed to check the servlet. Use the following steps:

  1. Start the Web application server.
  2. In a Web browser, go to http://<yourhostname.yourdomain>:8080/db2e/db2erdb
  3. You should receive the following message:
    com.ibm.mobileservices.adapter.rdb.RDb <date> <time>
    DB2 Everyplace SyncServer 7.2.1 <build date>
    

If you receive a message that port 8080 is already taken by another program, change the port number. To change the port number go to $DSYINSTDIR/WebSphere/AppSrver/bin/servletengine.bat. Near the bottom of the file, change the port number in the following entry to any free port:

-Dcontrolserver.websphere.websphere.port=xxxx ...

Installing DB2 Everyplace on a UNIX workstation

This section describes how to install and configure the DB2 Everyplace engine and DB2 Sync Server on a UNIX operating system.

Setting DB2 Universal Database parameters

Ensure that you have installed all the required prerequisites. See Prerequisites. For UNIX operating systems, you must set some DB2 Universal Database parameters before using DB2 Everyplace.

Installing the Sync Server

To install DB2 Everyplace Sync Server on UNIX:

  1. Copy files from DB2Everyplace_SyncServerInstall_{platform}.tar. (where {platform} is either AIX, Linux, or Solaris Operating Environment) to a temporary directory.
  2. For AIX and Linux, in the temporary directory, un-tar the files using the following command:
    tar xvf DB2Everyplace_SyncServerInstall_[platform].tar
    

    If you are using Solaris Operating Environment, execute this command before you un-tar the files:

    gunzip DB2Everyplace_SyncServerInstall_solaris,tar.gz
    
  3. Change to the root user:
    su root
    
  4. Change to the DB2Everyplace_SyncServerInstall directory.
  5. Run the setup program:
    ./setup
    

    Running setup will install DB2 Everyplace Sync Server into the following directory:

  6. Enter Y when prompted to start copying files.
  7. Enter Y when asked whether you want to install a DB2 Everyplace user instance.
  8. Select the language that you want to use for this installation. For example, enter en_US for English. To determine the default language of the DB2 instance user ID, execute the UNIX command: locale.

    The installation program lists the users that currently have DB2 instances on the system.

  9. When prompted, enter a user name from the DB2 instance list the DB2 Everyplace installation. If you want to add a user to the DB2 instance list, see the DB2 Universal Database documentation on how to create a DB2 instance.
  10. Optional. To create another DB2 Everyplace Sync Server instance, change to the /opt/DB2Everyplace72/bin directory and run dsyicreate. You must be the root user to run this command.
  11. Optional. You can also run the following commands from /opt/DB2Everyplace72/bin:
  12. When you have finished creating DB2 Everyplace Sync Server instances, execute the login profile for each instance to ensure that the environment variables are set properly. The environment variable created by installing DB2 Everyplace Sync Server is $DSYINSTDIR.

Installing DB2 Everyplace and Sync Server client code

To install the client code:

  1. Unzip the db2e.zip file on a UNIX server.
  2. Download the files to a mobile device using the download directions for your mobile device. (Some types of mobile devices can only be connected to Windows servers.)

Post installation tasks on UNIX

Before you can use your mobile device to access DB2 databases, you must create a mid-tier server and set up replication for your databases. The mid-tier server, which is also referred to as a mirroring server, is used to cache data that is received when you synchronize from a mobile device. One mirroring server is used by many mobile devices to synchronize data. The data or updates that are destined for a DB2 database are held on the mirroring server until replication is performed between the database and the mirroring server. Replication can be set up to occur at regular intervals or done on demand. More detailed information about propagating data can be found in the DB2 Universal Database Replication Guide and Reference : .

The following sections tell you how to set up a mid-tier server, setting up a sample database, how to get started with replicating data, and what to do to test the servlet

Creating a mid-tier server

If your source database exists on a different machine than the mid-tier server, you need to link to it from the DB2 Universal Database Control (UDB) Center. In the Control Center, you add the host system, create an instance for the host system, then add the database to the host system using an alias for the name of the mid-tier database if necessary. You can create the mid-tier database from a DB2 command line (use the command: db2 create db), or use the Database Create wizard in the DB2 UDB Control Center. To create a mid-tier database on your local machine on the Sync Server instance, both the mid-tier database and the Sync Server control database (DSYCTLDB) must use the same code page.

Setting up sample databases

On Linux and Solaris operating systems, DB2 Everyplace Sync Server for UNIX includes a sample database configuration in the $DSYINSTDIR/Sample directory. You can install the sample database manually by entering ./ dsysample.sh on a DB2 command line. This script requires that the instance user ID and password be entered on the command line.

This sample database configuration includes the following components:

Enabling Replication

In order to replicate between the mirroring server and DB2 databases, you must create a table subscription for your databases. Replication is set up automatically when you install the Sync Server. If you want more information, refer to the DB2 Everyplace Sync Server Administration Guide : for information on how to define subscriptions and start replicating data.

Testing the Sync Server servlet

To ensure that the Sync Server can successfully communicate with clients, check the servlet. It is not necessary to have any clients installed to check the servlet. Use the following steps:

  1. Change to ~[db2instance]/db2everyplace/SyncServer/Server'.
  2. Run dsysync.sh
  3. You should receive the following message:
    com.ibm.mobileservices.adapter.rdb.RDb <date> <time>
    DB2 Everyplace SyncServer 7.2.1 <build date>
    

For AIX: If you are using WebSphere Application Server, do not preload the servlet by testing it from a Web browser.

For the Web application server that ships with DB2 Everyplace, you might receive a message that port 8080 is already taken by another program. If you receive this message, change the port number. To change the port number go to $DSYINSTDIR/WebSphere/AppSrver/bin/servletengine.sh. Near the bottom of the file, change the port number in the following entry to any free port:

-Dcontrolserver.websphere.websphere.port=xxxx ...

Where xxxx is any available port number.