Upgrades a database created with a previous version of the software or adds or removes Java or jConnect™ for JDBC™ support. Run this statement with Interactive SQL (dbisql).
ALTER DATABASE UPGRADE [ JAVA { ON | OFF | JDK { ‘ 1.1.8 ‘ | ‘ 1.3 ’ } } ] [ JCONNECT { ON | OFF } ] | REMOVE JAVA
Upgrade a database created with the Java options off:
ALTER DATABASE UPGRADE JAVA OFF JCONNECT OFF
The ALTER DATABASE statement upgrades databases created with earlier versions of the software. This applies to maintenance releases as well as major releases. For example, you can upgrade a database created with version 15.1 to 15.2.
See the Installation and Configuration Guide for backup recommendations before you upgrade.
When you upgrade a database, Sybase IQ makes these changes:
Upgrades the system tables to the current version.
Adds any new database options.
Enables new features in the current version.
You can also use ALTER DATABASE UPGRADE simply to add Java or jConnect features if the database was created with the current version of the software.
WARNING! Be sure to start the server in a way that restricts user connections before you run ALTER DATABASE UPGRADE. For instructions and other upgrade caveats, see the chapter “Migrating Data,” in the Installation and Configuration Guide for your platform.
After using ALTER DATABASE UPGRADE, shut down the database.
Use the iqunload utility to upgrade databases created in versions earlier than 15.0. See Chapter 6, “Migrating Data” in the Installation and Configuration Guide for your platform.
JAVA clause Controls support for Java in the upgraded database.
Specify JAVA ON to enable support for Java in the database by adding entries for the default Sybase runtime Java classes to the system tables. If Java in the database is already installed, but is at a lower version than the default classes, this clause upgrades it to the current default classes. The default classes are the JDK 1.3 classes.
Specify JAVA OFF to prevent the addition of Java in the database to databases that do not already have it installed. For databases that already have Java installed, setting JAVA OFF does not remove Java support: the version of Java remains at the current version. To remove Java from the database, use the REMOVE JAVA clause.
Specify JAVA JDK ‘1.1.8’ or JAVA JDK ‘1.3’ to install support for the named version of the JDK.
The ALTER DATABASE UPGRADE statement only upgrades your database to a higher version of JDK. To downgrade, first remove Java from the database, then add it back with the lower JDK version. For example, to downgrade from JDK 1.3 to JDK 1.1.8:
ALTER DATABASE REMOVE JAVA ALTER DATABASE UPGRADE JAVA JDK '1.1.8'
Classes for JDK 1.1.8 are stored in java/1.1/classes.zip under the Sybase IQ installation directory. Classes for JDK 1.3 are stored in java/1.3/rt.jar.
The default behavior is JAVA OFF.
To use Java after adding it in the database, you must restart the database.
JCONNECT clause To allow the Sybase jConnect JDBC driver to access system catalog information, you must specify JCONNECT ON. This installs jConnect system tables and procedures. To exclude the jConnect system objects, specify JCONNECT OFF. You can still use JDBC, as long as you do not access system catalog information. The default is to include jConnect support (JCONNECT ON).
REMOVE JAVA clause Removes Java from a database. The operation leaves the database as if it were created with JAVA OFF. When the statement is issued Java in the database must not be in use. Remove all Java classes from the database before executing this statement. The statement ignores stored procedures and triggers that reference Java objects, and the presence of these objects does not trigger an error in the ALTER DATABASE statement.
Automatic commit
Must have DBA authority.
“Migrating Data” in the Installation and Configuration Guide for your platform
”Introduction to Java support”in SQL Anywhere Server – Programming