Chapter 6 Java DB
This chapter describes how to upgrade Java DB from Java ES 5 (Release
5) to Java ES 5 Update 1 (Release 5U1): Java DB 10.2.2.
The chapter provides an overview of upgrade considerations for the different
upgrade paths supported by Release 5U1. This chapter covers the following
topics:
Note –
File locations in this chapter are specified with respect to a
directory path referred to as JavaDB-base. This
path was set by the Java ES installer when Java DB was installed.
The
values of this directory path is :
-
JavaDB-base
-
C:\Program Files\Sun\JavaES5\JavaDB
Overview of Java DB Upgrades
The following sections describe general aspects of Java DB that impact
upgrading to Java ES 5 Update 1 (Release 5U1):
About Release 5U1 Java DB
Release 5U1 Java DB is a maintenance release that fixes bugs in Release
5 Java DB and provides some minor enhancements.
Java DB Upgrade Roadmap
The following table shows the supported Java DB upgrade paths to Java
ES Release 5U1.
Table 6–1 Upgrade Paths to Java ES 5 Update
1: Java DB 10.2.2
|
Java ES Release
|
Java DB Release
|
General Approach
|
Reconfiguration Required
|
|
Release 5
|
Java DB 10.1.3.1
|
Maintenance upgrade. Apply patches.
|
None
|
Java DB Data
The following table shows the type of data that could be impacted by
an upgrade of Java DB software.
Table 6–2 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 Compatibility Issues
Release 5U1 Java DB is backwardly compatible with the Release 5 version.
Java DB Dependencies
Java DB has dependency only on the J2SE shared component (see Table 1–8)
Upgrading Java DB from Java ES 5
This section includes information about upgrading Java DB from Java
ES 5 to Java ES 5 Update 1. The section covers the following topics:
Introduction
When upgrading Release 5 Java DB to Release 5U1, consider the following
aspects of the upgrade process:
-
General Upgrade Approach. The
upgrade is achieved by patching Release 5 Java DB.
-
Upgrade Dependencies. Java
DB has dependencies on a number of Java ES shared components (see Table 1–8), none of which need to be upgraded
when you perform a maintenance upgrade of Java DB.
-
Backward Compatibility. Release
5UI Java DB is backwardly compatible with the Release 5 version.
Release 5 Java DB Upgrade
This section describes how to perform an upgrade of Java DB from Java
ES 5 to Java ES 5 Update 1. This section covers the following topics:
Pre-Upgrade Tasks
Before you upgrade Java DB, perform the tasks described below.
Verify Current Version Information
Verify the current version of Java DB before you upgrade.
To Verify Current Version Information
-
Type the following command:
java -cp JavaDB-base\lib\derby.jar org.apache.derby.tools.sysinfo
This command returns the Java DB version information.
- Release 5U1
-
Java DB 10.2.2.1
- Release 5
-
Java DB 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 Release 5U1. Release
5U1 Java DB has no hard upgrade dependencies, so upgrade of shared components
is optional. However, the upgrade of Java DB to Release 5U1 requires that
Windows Installer patch (126910–02) is already applied.
Backing Up Java DB Data
The Java DB upgrade from Release 5 to Release 5U1 does not modify the
Release 5 configuration data. However, for the sake of security, you should
back up your entire Java DB installation and your data.
Upgrading Release 5 Java DB
This section discusses considerations that impact the upgrade procedure
for Java DB, followed by a description of the procedure itself.
Upgrade Considerations
The upgrade of Java DB software to Java ES Release 5U1 takes into account
the following considerations:
-
In a deployment architecture in which there are multiple instances
of Java DB running on a single computer (all corresponding to the same installed
Java DB image), you only have to upgrade the Java DB image once.
-
In a maintenance upgrade, you do not have to migrate schema,
configuration, security or user data.
-
The Release 5U1 Java DB upgrade patches for Windows are shown
in the following table:
Table 6–3 Patches to Upgrade Java DB on Windows
|
Description
|
Patch ID [Patch revision numbers are the minimum required for upgrade to Release
5U1. If newer revisions become available, use the newer ones instead of those
shown in the table.]
|
|
Java DB
|
125272–02
|
Upgrade Procedure
The procedure documented below applies to Java DB instances residing
locally on the computer where the upgrade is taking place.
To Upgrade Java DB to Java ES 5 Update 1
-
Log in as administrator.
-
Stop any Java DB instances.
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 stop all applications using Java DB.
-
Make sure you have upgraded any Java ES components upon which
Java DB has hard upgrade dependencies (see Upgrade Java DB Dependencies).
-
Obtain the required Java DB Release 5U1 upgrade patches, based
on Table 6–3.
To obtain the patch, see Accessing Java ES Patches. Patches can be downloaded to \workingDirectory.
-
Install the patch.
Installation is generally performed
by running patch-id.exe, however,
be sure to consult the README.patch-id file
in the patch directory for installation instructions.
Note –
If you are prompted to restart the system, select No. Wait till
the patch installation process is completed and then restart and re-login
as the same user to complete the patch installation.
-
Verify the patch log file.
The log file is found
at: %TEMP%\SUNJAVAES_<patch-id>.log
-
Verify the patch installation with the utility ListJavaESPatches.exe.
Run ListJavaESPatches.exe and check
that the output includes the patch id of the patch that you have installed
in Step 5. For more information, see Identifying Installed Java ES Patches.
-
Start the Release 5 Java DB instances.
For example,
start Java DB instance for Portal Server with ANT from the command line.
JavaES5-Install-Dir\share\ant\bin\ant.bat
-DPS_CONFIG=PortalServer-base\config\PSConfig.properties
-f PortalServer-base\lib\derby.xml start-instance
-
Start any Java DB clients.
Verifying the Upgrade
You can verify successful upgrade of Java DB by starting the Java DB
instance as follows:
java -cp JavaDB-base\lib\derby.jar
org.apache.derby.tools.sysinfo
The messages that indicate the Java ES release version are:
- Release 5U1
-
Java DB 10.2.2.1
- Release 5
-
Java DB 10.1.3.1
Post-Upgrade Tasks
When upgrading Java DB from Release 5 to Release 5 Update 1, you must
convert data from the Java DB 10.1 disk format to the 10.2 format if you want
to take full advantage of the enhanced functionality of Release 5U1.
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.2
ij> connect 'jdbc:derby:\databasePath;upgrade=true';
ij> exit;
For more information, see the Getting Started Guide in
the docs directory of your Java DB installation.
Rolling Back the Upgrade
A rollback of the Release 5U1 upgrade cannot be achieved except by reverting
to a backup Release 5 installation and its data.