Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Database Administration » Administering Your Database » Database administration utilities


Upgrade utility (dbupgrad)

Upgrade utility unsupported for upgrading to version 11

The Upgrade utility (dbupgrad) cannot be used to upgrade version 9.0.2 and earlier databases to version 11. If you want to upgrade a version 9.0.2 or earlier database to version 11, you must rebuild the database by performing an unload and reload. See Upgrading SQL Anywhere.

Updates the system tables and views, adds new database options, and recreates all system stored procedures. Installs jConnect support and changing support for Java in the database.

An error message is returned if you use the Upgrade utility to upgrade a database server that is currently being mirrored.

dbupgrad [ options ]
Option Description

Read in options from the specified environment variable or configuration file. See Using configuration files.

If you want to protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file. See File Hiding utility (dbfhide).

-c "keyword=value; ..."

Specify connection parameters. See Connection parameters.

The user ID must have DBA authority.

For example, the following command upgrades a database called sample11 and does not install jConnect support, connecting as user DBA with password sql:

dbupgrad -c "UID=DBA;PWD=sql;DBF=c:\sa11\sample11.db" -i

Exclude the jConnect system objects. If you want to use the jConnect JDBC driver to access system catalog information, you need to install jConnect support. You can still use JDBC when this option is specified, as long as you do not access system information. If you want, you can add jConnect support later using Sybase Central or the ALTER DATABASE UPGRADE statement. See Installing jConnect system objects into a database and ALTER DATABASE statement.

-o filename Write output messages to the specified file.
-q Run in quiet mode—do not display messages or windows.

You should always back up your database files before upgrading. If you apply the upgrade to the existing files, then these files become unusable if the upgrade fails. For information about backing up your database, see Backup and data recovery.

The dbupgrad utility upgrades a database created with earlier versions of the software to enable features from the current version of the software. The earliest version that can be upgraded is SQL Anywhere 10.0.0. While later versions of the database server can run against databases that were created with earlier releases of the software, some of the features introduced since the version that created the database are unavailable unless the database is upgraded.

Databases with materialized views

It is recommended that you refresh the materialized views in your database after upgrading the database. See Refresh manual views.

You can use the Upgrade utility to update the system tables and views, add new database options, restore database options, and recreate all system stored procedures, and install jConnect support and change support for Java in the database.

As new versions and software updates become available for SQL Anywhere, you can use the Upgrade utility to take advantage of the new features.

Upgrading a database does not require you to unload and reload your database.

If you want to use replication on an upgraded database, you must also archive your transaction log and start a new one on the upgraded database.

You can access the Upgrade utility in the following ways:

  • From Sybase Central, using the Upgrade Database Wizard.

  • From Interactive SQL, using the ALTER DATABASE UPGRADE statement. See ALTER DATABASE statement.

  • At a command prompt, using the dbupgrad command.

Exit codes are 0 (success) or non-zero (failure). See Software component exit codes.

Not all features made available

Features that require a physical reorganization of the database file are not made available by dbupgrad. Such features include index enhancements and changes in data storage. To obtain the benefits of these enhancements, you must unload and reload your database. See Upgrading SQL Anywhere.