Upgrading a database

To upgrade a database, you must explicitly request an upgrade the first time you connect to it with the new version of Derby.

Do not attempt to upgrade a database without first backing it up.

To request an upgrade when connecting to the database:

Use the upgrade=true database connection URL attribute, as shown in the following example:
jdbc:derby:sample;upgrade=true
Once the upgrade is complete, you cannot connect to the database with an older version of Derby.
You can find out the version of Derby using sysinfo:
java org.apache.derby.tools.sysinfo
Note that this is the version of Derby, not the version of the database. Sysinfo uses information found in the Derby jar files, so verify that only one version of Derby's jar files are in your class path when you run this tool.
Related tasks
Preparing to upgrade
Soft upgrade