db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "UpgradingTen" by KatheyMarsden
Date Thu, 02 Sep 2010 13:23:21 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The "UpgradingTen" page has been changed by KatheyMarsden.
http://wiki.apache.org/db-derby/UpgradingTen?action=diff&rev1=2&rev2=3

--------------------------------------------------

- = Upgrading Derby 10.0 to 10.1 – Very Simple! =
+ = Upgrading Derby 10.x  – Very Simple! =
  == Overview ==
- Upgrading your application to use Derby 10.1 with an existing 10.0 database is extremely
easy. There are two options:
+ Upgrading your application to use a new Derby version with an existing 10.x database is
extremely easy. There are two options:
-   * Soft Upgrade - Use when your application is not changing but you want to use the new
version of Derby.
-   * Full Upgrade - Use when you want to take advantage of all of Derby 10.1's new features!
  
- The [[http://db.apache.org/derby/releases/release-10.1.1.0.cgi|official Derby 10.1 release]]
is available at the [[http://db.apache.org/derby/derby_downloads.html|Derby downloads]] page.
These instructions, though, apply to any 10.1 release, including the up-coming 10.1.2 bug
fix release.
+  * Soft Upgrade - Use when your application is not changing but you want to use the new
version of Derby.
+  * Full Upgrade - Use when you want to take advantage of all of Derby  new features!
+ 
+ The latet Derby release is available at the [[http://db.apache.org/derby/derby_downloads.html|Derby
downloads]] page. These instructions, though, apply to any 10.x release.
  
  /!\ Taking a backup before an upgrade is a good precaution.
  
  == Soft Upgrade ==
- 
- Soft upgrade allows you to run your application with Derby 10.1 while leaving the option
to revert to 10.0 should you discover any issues.
+ Soft upgrade allows you to run your application with an older Derby version  while leaving
the option to revert should you discover any issues.
  
  Three simple steps:
  
-   1. Shutdown the application running Derby
+  1. Shutdown the application running Derby
-   1. Change the application to use the Derby 10.1 jar files
+  1. Change the application to use the new Derby jar files
-      * Either by changing the class path to point to the 10.1 jar files instead of the 10.0
jar files,
+   * Either by changing the class path to point to the new  jar files instead of the previous
10.x jar files,
-      * Or replace all the 10.0 jar files the application is using with the 10.1 jar files.
+   * Or replace all the old derby jar files the application is using with the new Derby 
jar files.
-   1. Restart your application.
+  1. Restart your application.
  
- That's it :-) , your application is now running using the 10.1 jar files.
+ That's it :-) , your application is now running using the new jar files.
  
- You may switch your application back to 10.0 at any time by following an identical procedure,
swapping 10.0 and 10.1.
+ You may switch your application back to  at any time by following an identical procedure,
swapping the old jars for the new. It is perfectly fine to skip versions and upgrade directly
from 10.1 to 10.6 for instance and back again from soft upgrade.
  
- === Selected 10.1 New Features ===
+ === Selected  New Features ===
+ Soft upgrade does allow your application to use selected new features,and take advantage
of bug fixes,  but obviously if you modify your application to depend upon them, then application
will no longer run against the previous version.  Generally, features can be used in soft
upgrade if they don't modify the system catalogs.  For example in 10.6, you cannot use UDT's
in soft upgrade mode from a previous version, but the new CROSS JOIN syntax will work in soft
upgrade.
- 
- Soft upgrade does allow your application to use selected new features, but obviously if
you modify your application to use them, then application will no longer run against 10.0.
- 
- The new features are:
- 
-     * New open source Derby network client driver
-     * Support for J2ME/CDC/Foundation with JSR-169 JDBC subset
-     * XA support for Network Server
-     * Increased identifier lengths to 128 characters for all identifiers
-     * JDBC Updatable Result Sets
-     * ORDER by expressions
- 
  
  == Full Upgrade ==
- 
- Full upgrade allows your application to take full advantage of Derby 10.1's new features,
but means that you can no longer revert to 10.0 for the database.
+ Full upgrade allows your application to take full advantage of Derby  new features, but
means that you can no longer revert to the previous Derby version  for the database.
  
  Three simple steps:
  
-   1. Shutdown the application running Derby
+  1. Shutdown the application running Derby
-   1. Change the application to use the 10.1 jar files
+  1. Change the application to use the new Derby  jar files
-      * Either by changing the class path to point to the 10.1 jar files instead of the 10.0
jar files,
+   * Either by changing the class path to point to the new  Derby jar files instead of the
Derby old jar files,
-      * Or replace all the 10.0 jar files the application is using with the 10.1 jar files.
+   * Or replace all the old  Derby  jar files the application is using with the new jar files.
-   1. Ensure that the first connection request includes the attribute upgrade set to true.
+  1. Ensure that the first connection request includes the attribute upgrade set to true.
-      * Either by connecting using ij with a JDBC URL like: {{{jdbc:derby:mydb;upgrade=true}}}
+   * Either by connecting using ij with a JDBC URL like: {{{jdbc:derby:mydb;upgrade=true}}}
-      * Or by running a simple Java JDBC program that connects to the database setting the
{{{upgrade}}} attribute
+   * Or by running a simple Java JDBC program that connects to the database setting the {{{upgrade}}}
attribute
-        {{{
+    . {{{
      // Using JDBC URLs
      String dbURL = "jdbc:derby:mydb";
      Properties connProps = new Properties();
      connProps.put("upgrade", "true");
      ... set any other properties
      Connection conn = DriverManager.getConnection(dbURL, connProps);
-        }}}
+ }}}
-      * Setting the Java Bean property for the Derby Data''''''Source {{{connectionAttributes}}}
to include {{{upgrade=true}}} in its value.
+   * Setting the Java Bean property for the Derby DataSource {{{connectionAttributes}}} to
include {{{upgrade=true}}} in its value.
-      * Or by including an upgrade feature in your application that allows the user to select
upgrade and connects to the databse with the upgrade attibute. This application code would
use one of the three methods above.
+   * Or by including an upgrade feature in your application that allows the user to select
upgrade and connects to the databse with the upgrade attibute. This application code would
use one of the three methods above.
  
- That's it :-) , your application is now running using the 10.1 jar files.
+ That's it :-) , your application is now running using the new Derby jar files and can take
full advantage of the new features.
  
- If you attempt to boot 10.0 against the database just upgraded, then the boot will fail.
+ If you attempt to boot the old Derby version  against the database was just hard upgraded,
then the boot will fail.
+ 
  {{{
  ERROR XJ040: Failed to start database 'cs', see the next exception for details.
- ERROR XSLAN: Database at C:\_work\derby\cs has an incompatible format with the current version
of the software.  The database was created by or upgraded by version 10.1.
+ ERROR XSLAN: Database at C:\_work\derby\cs has an incompatible format with the current version
of
  }}}
  
- 
- === Enabled 10.1 New Features ===
- 
- In addition to the features listed in Soft Upgrade, these new features are enabled by full
upgrade:
- 
-     * Online compress functionality for reclaiming disk space during operation
-     * Increased identifier lengths to 128 characters for all identifiers
-     * Added SQL: INTERSECT and EXCEPT
-     * Added SQL: SYNONYM
-     * Allow insertions into an identity column
- 

Mime
View raw message