upgrade=true attribute

Function

Upgrades a database that was created using an earlier version of Derby to the current version of Derby, then connects to it. If the database does not exist, an error appears in the error log and the connection attempt fails with an SQLException indicating that the database cannot be found.

This operation performs a full upgrade, as defined in "Upgrading a database" in the Derby Developer's Guide. For more information about upgrades, see the other topics under "Upgrades" in the Derby Developer's Guide.

For a database for which authentication and SQL authorization are both enabled, only the database owner can perform a full upgrade. See also "Enabling user authentication" and "Setting the SQL standard authorization mode" in the Derby Developer's Guide for more information.

Combining with other attributes

You must specify a databaseName (after the subprotocol in the database connection URL) or a databaseName=nameofDatabase attribute with this attribute.

You cannot combine this attribute with the collation or territory=ll_CC attributes.

jdbc:derby:sampleDB;upgrade=true

jdbc:derby:;databaseName=sampleDB;upgrade=true;