ALTER DATABASE statement

Description

Upgrades a database created with a previous version of the software or adds or removes Java or jConnect support. Run this statement with Interactive SQL Java.

Syntax

ALTER DATABASE
	UPGRADE
		[ JAVA { ON | OFF 
			| JDK { ‘ 1.1.8 ‘ | ‘ 1.3 ’ } } ]
		[ JCONNECT { ON | OFF} ]
	| REMOVE JAVA 

Examples

Example 1

Upgrade a database created with the Java options off:

ALTER DATABASE UPGRADE JAVA OFF JCONNECT OFF

Usage

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 12.6 to 12.7.

NoteSee the Sybase IQ Installation and Configuration Guide for backup recommendations before you upgrade.

When you upgrade a database, Sybase IQ makes the following changes:

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 Sybase IQ Installation and Configuration Guide for your platform.

After using ALTER DATABASE UPGRADE, shut down the database.

NoteIf upgrade of a Sybase IQ 12.6 database returns a “Database upgrade not possible” error, see “Insufficient procedure identifiers,” in Sybase IQ Troubleshooting and Recovery Guide.

JAVA clause Controls support for Java in the upgraded database.

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.


Side effects

Standards

Permissions

Must have DBA authority.

See also

CREATE DATABASE statement

“Migrating Data” in the Sybase IQ Installation and Configuration Guide

“Introduction to Java in the Database” in the Adaptive Server Anywhere Programming Guide