Sun Java Enterprise System 5 Upgrade Guide for UNIX |
Chapter 8
Java DBThis 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 UpgradesThis 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.
Java DB Data
The following table shows the type of data that could be impacted by an upgrade of Java DB software.
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
- Back up existing Java DB data.
See Java DB Data for the location of essential data.
- Install the new operating system.
The operating system installation can be on a new system (or a Solaris 10 zone) or it can wipe out the existing file system.
- Install Release 5 Java DB.
- Restore the Java DB data that was backed up in Step 1.
In-place Operating System Upgrade
- Back up existing Java DB data.
See Java DB Data for the location of essential data.
- Upgrade the operating system.
The upgrade leaves the existing file system in place.
- Upgrade to Release 5 Java DB.
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 4This 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:
- General Upgrade Approach. The upgrade is achieved by performing a fresh install of Release 5 Java DB, replacing the Release 4 version. Release 4 data and configuration remain intact.
- Upgrade Dependencies. Java DB has a hard upgrade dependency on the J2SE shared component (see Table 1-9), which is automatically upgraded to Release 5 by the Java ES installer when you perform an upgrade of Java DB.
- Backward Compatibility. Release 5 Java DB is fully compatible with Release 4.
- Upgrade Rollback. A rollback of the Release 5 upgrade cannot be achieved except by reverting to a backed up Release 4 installation.
- Platform Issues. The general approach for upgrading Java DB is the same on both Solaris and Linux operating systems.
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.
- Log in as root or become superuser.
su -
- Stop Release 4 Java DB.
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.
- Perform a fresh install of Release 5 Java DB.
Perform the following steps:
- Launch the Java ES installer on the computer hosting Release 4 Java DB.
cd Java ES Release 5 distribution/os_arch
./installerwhere 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.”)
- Select Java DB from the component selection page.
The previous installation will be overwritten.
- Select the Configure Later option.
Configure Now is not supported.
- If needed, select the option to install localized packages.
- Exit the Java ES installer when installation is complete.
- Start Release 5 Java DB.
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.