Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java Enterprise System 5 Upgrade Guide for UNIX 

Chapter 8
Java DB

This chapter describes how to upgrade Java DB to Java ES 5 (Release 5): Java DB 10.1.3.

The chapter provides an overview of upgrade considerations for the different upgrade paths supported by Release 5. The chapter covers upgrades on both the Solaris and Linux operating systems:


Overview of Java DB Upgrades

This section describes the following general aspects of Java DB that impact upgrading to Java ES 5 (Release 5):

About Java ES Release 5

Java ES Release 5 Java DB is the first release to be delivered as a Java ES product component; Java DB was first released as a shared component named DerbyDatabase, included in Java ES Release 4.

Release 5 Java DB represents a minor release with respect to the Release 4 version. It includes some improved functionality, updated interfaces, and selected bug fixes.

Java ES Release 5 Upgrade Roadmap

Table 8-2 shows the supported Java DB upgrade paths to Java ES Release 5. The table applies to both Solaris and Linux operating systems.

Table 8-2  Upgrade Paths to Java ES 5 (Release 5): Java DB 10.1.3 

Java ES Release

Java DB Version

General Approach

Reconfiguration Required

Release 4

Derby Database 10.0.2

Direct upgrade:
Replace Release 4 with a fresh install. Persistent data is not affected.

None

Java DB Data

The following table shows the type of data that could be impacted by an upgrade of Java DB software.

Table 8-3  Java DB Data Usage

Type of Data

Location

Usage

Configuration data

Instance configuration is application-specific and is stored in the Java DB database.

Configuration of Java DB instance

Persistent data

Database directories and their contents are application-specific. Their location is specified by the database connection URL,
jdbc:derby:full path to database.

Database and user certificates

Java DB Upgrade Strategy

Your strategy for upgrading Java DB generally depends on the many considerations discussed in Chapter 1, "Planning for Upgrades": upgrade path, dependencies between Java ES components, selective upgrade versus upgrade all, multi-instance deployments, and so forth.

This section is to particularize that general discussion to Java DB by presenting issues that might influence your Java DB upgrade plan.

Compatibility Issues

Release 5 Java DB is backwardly compatible with the Release 4 version.

Dependencies

Java DB has a dependency only on the J2SE shared component (see Table 1-9).

Dual Upgrade

Dual upgrades, in which both Java DB and operating system are upgraded (as described in Dual Upgrades: Java ES and Operating System Softwared) can be performed in either of two ways:

Fresh Operating System Installation
  1. Back up existing Java DB data.
  2. See Java DB Data for the location of essential data.

  3. Install the new operating system.
  4. The operating system installation can be on a new system (or a Solaris 10 zone) or it can wipe out the existing file system.

  5. Install Release 5 Java DB.
  6. Restore the Java DB data that was backed up in Step 1.
In-place Operating System Upgrade
  1. Back up existing Java DB data.
  2. See Java DB Data for the location of essential data.

  3. Upgrade the operating system.
  4. The upgrade leaves the existing file system in place.

  5. Upgrade to Release 5 Java DB.
  6. See the Upgrading Java DB from Java ES Release 4.

    Java DB data should remain unaffected by the upgrade.


Upgrading Java DB from Java ES Release 4

This section includes information about upgrading Java DB from Java ES 2005Q4 (Release 4) to Java ES 5 (Release 5). The section covers the following topics:

Introduction

When upgrading Java ES Release 4 Java DB to Release 5, consider the following aspects of the upgrade process:

Release 4 Java DB Upgrade

This section describes how to perform an upgrade of Java DB from Java ES Release 4 to Java ES Release 5 on both the Solaris and Linux platform. The section covers the following topics:

Pre-Upgrade Tasks

Before you upgrade Java DB software you should perform the following tasks:

Verify Current Version Information

You can verify the current version of Java DB using the following command:

java -cp JavaDB-base/lib/derby.jar org.apache.derby.tools.sysinfo

The version information (for the derby.jar file) is shown in the following table:

Table 8-4  Java DB Version Verification Outputs

Java ES Release

Java DB Version Number

Release 4

10.0.2.1

Release 5

10.1.3.1

Upgrade Java DB Dependencies

It is generally recommended that all Java ES components on a computer system (and in a computing environment) be upgraded to Java ES Release 5. However, all shared components required by Java DB are upgraded automatically by the Java ES installer when you perform an upgrade of Java DB to Release 5.

Back Up Java DB Data

The Java DB upgrade from Release 4 to Release 5 does not modify configuration data or persistent data. However, for the sake of security, you should back up your entire Java DB installation and your data. See Table 8-3.

Obtain Required Configuration Information and Passwords

No configuration information or password is required to upgrade Java DB.

Upgrading Release 4 Java DB

This section describes the upgrade procedure on Solaris and Linux platforms.

Upgrade Procedure

The procedure documented below applies to all Java DB instances residing locally on the computer where the upgrade is taking place.

  1. Log in as root or become superuser.
  2. su -

  3. Stop Release 4 Java DB.
  4. If you have a network server running, use the following command:

    java -cp JavaDB-base/lib/derby.jar:JavaDB-base/lib/derbynet.jar org.apache.derby.drda.NetworkServerControl shutdown

    Otherwise, simply shut down all applications using Java DB.

  5. Perform a fresh install of Release 5 Java DB.
  6. Perform the following steps:

    1. Launch the Java ES installer on the computer hosting Release 4 Java DB.
    2. cd Java ES Release 5 distribution/os_arch
      ./installer

      where os_arch matches your platform, such as Solaris_sparc. (Use the installer -nodisplay option for the command line interface.)

      After the Welcome and License Agreement pages are displayed, you will be presented with a component selection page. (When installed components are detected that can be directly upgraded by the Java ES installer, they are shown with a status of “upgradable.”)

    3. Select Java DB from the component selection page.
    4. The previous installation will be overwritten.

    5. Select the Configure Later option.
    6. Configure Now is not supported.

    7. If needed, select the option to install localized packages.
    8. Exit the Java ES installer when installation is complete.
  7. Start Release 5 Java DB.
  8. If you are using a network server, use the following command:

    java -jar <JavaDB-base>/lib/derbynet.jar start

    Otherwise, simply start any application using Java DB in embedded mode.

Verifying the Upgrade

You can verify successful upgrade of Java DB using the following command:

java -cp JavaDB-base/lib/derby.jar org.apache.derby.tools.sysinfo

See Table 8-4 for output values (for the version of the derby.jar file).

Post-Upgrade Tasks

When upgrading Java DB from Release 4 to Release 5, you must convert data from the Java DB 10.0 disk format to the 10.1 format. To perform this conversion, connect to the database with upgrade=true appended to the JDBC URL. For example:

java -cp JavaDB-base/lib/derbytools.java:JavaDB-base/lib/derby.jar org.apache.derby.tools.ij

ij version 10.1

ij> connect 'jdbc:derby:/databasePath;upgrade=true';

ij> exit;

Rolling Back the Upgrade

A rollback of the Release 5 upgrade cannot be achieved except by reverting to a backup Release 4 installation and its data.

Multiple Instance Upgrades

In some deployment architectures Java DB is deployed on multiple computer systems to provide for scalability and to improve availability. For example, you might have Java DB instances running on multiple computers with a load balancer to distribute the load.

You perform the upgrade of Java DB on each computer as described in Release 4 Java DB Upgrade.



Previous      Contents      Index      Next     


Part No: 819-6553-11
June 2007.   Copyright 2007 Sun Microsystems, Inc. All rights reserved.