DB2 Version 9.7 for Linux, UNIX, and Windows

Upgrade impact from DB2 command changes

The changes in DB2® Version 9.7 to DB2 command line processor (CLP) and system commands can impact your existing applications and scripts after you upgrade to DB2 Version 9.7.

The changes to commands include new parameters, modifications to existing parameters, deprecated or discontinued parameters, and modifications to command output. The following table lists the changes that impact applications and scripts:
Table 1. Changes to DB2 CLP and system commands
Command Summary of changes with upgrade impact
db2advis This command can now make recommendations to convert standard tables with XML columns to multidimensional clustering (MDC) tables, and to use compression on indexes.
db2cat For non-partitioned indexes, the command output now includes the new column indexTbsp to indicate the tablespace ID. For partitioned indexes, the command output includes the new column indexTbsp to indicate the tablespace ID and the new column indexObjId to indicate the index object ID.

In base tables, the dependent MQTs output now includes a new field called MQT Flags.

db2ckmig This command is deprecated and might be removed in a future release. Use the db2ckupgrade command instead.
db2ckupgrade This command replaces the db2ckmig command.

This command checks for type-1 indexes and generates a script file using the REORG TABLE command to convert type-1 indexes to type-2 indexes. Type-1 indexes are not supported in DB2 Version 9.7. See Converting type-1 indexes to type-2 indexes for details.

This command now requires that the instance owning the databases that you want to verify is running. You no longer have to stop the instance to run this command. If the instance is not started, the db2ckupgrade command returns the SQL1032N error message.

db2dart The /DD parameter now includes inline length data as part of the formatted table data.
db2expln,
db2exmig,
db2jdbcbind,
db2sqljbind,
db2sqljcustomize and
db2rbind
Due to changes in the DB2 authorization model, the SYSADM group is no longer authorized to perform these commands. The UPGRADE DATABASE command grants DBADM authority to the SYSADM group so that there is no upgrade impact. However, for these commands, you should review all of the changes in authorization and grant any required authorization to users.

If you create databases in DB2 Version 9.7, you have to grant the required authorization to users that need to run these commands or grant DBADM authority to the SYSADM group to maintain the same authorization as in previous releases.

db2gpmap The output generated by this command is larger due to the increase of the distribution map size.
db2icrt On Linux and UNIX operating systems, these commands now write to a new file called INSTHOME/sqllib/log/db2instance.log, where INSTHOME is the home directory for the instance owner. This file acts as a history file that records the instance activities such as create (db2icrt), drop (db2idrop), update (db2iupdt) and upgrade (db2iupgrade) and is only intended for DB2 support use.
db2idrop In partitioned database environments, issue the db2idrop command from any database partition only once. The db2idrop command updates the global registry for all available database partitions and removes the instance from the registry. If a database partition is not available, you will receive the DBI1165E error message and the DBI1383I warning message.

On Linux and UNIX operating systems, these commands now write to a new file called INSTHOME/sqllib/log/db2instance.log, where INSTHOME is the home directory for the instance owner. This file acts as a history file that records the instance activities such as create (db2icrt), drop (db2idrop), update (db2iupdt) and upgrade (db2iupgrade) and is only intended for DB2 support use.

db2imigr This command is deprecated and might be removed in a future release. Use the db2iupgrade command instead.
db2iupgrade and
db2iupdt
The db2iupgrade command replaces the db2imigr command.

If you issue the db2iupgrade or db2iupdt command with the -u parameter to indicate a different fenced ID than the previously defined fenced ID, this different fenced ID overwrites the previously defined one. In previous releases, the -u parameter was ignored.

In a partitioned database environment, the db2iupgrade and db2iupdt commands update the global registry for all available database partitions. This means if the instance is updated or upgraded successfully, the command removes the instance from the DB2 registry under the DB2 copy location where the instance was running and adds it under the DB2 copy location from which you are running the command. If a database partition is not available, you will receive the DBI1165E error message and the DBI1383I warning message.

On Linux and UNIX operating systems, these commands now write to a new file called INSTHOME/sqllib/log/db2instance.log, where INSTHOME is the home directory for the instance owner. This file acts as a history file that records the instance activities such as create (db2icrt), drop (db2idrop), update (db2iupdt) and upgrade (db2iupgrade) and is only intended for DB2 support use.

db2look Although you can run this command with the same authorization that was required before upgrading your data server, now you might require SECADM authority, ACCESSCTRL authority, DATAACCESS authority, or all of them in some cases. The -x parameter now generates the authorization DDL for all of the new database authorities.

Starting in Version 9.7 Fix Pack 6, the -e parameter generates CREATE SCHEMA DDL statements for implicitly created schemas by default. If you specify the new -noimplschema parameter with the -e parameter, the CREATE SCHEMA DDL statements for implicitly created schemas are not generated, which was the default behavior in previous Version 9.7 fix packs and in previous releases.

db2pd The command output now includes information about scan sharing for tables and block indexes on MDC tables. The information that this command returns differs for individual shared scans, sharing sets, or sharing groups.

For automatic storage table spaces, the -storagepaths parameter output now shows the new PathID and PathState columns to indicate the storage path identifier and current state. Also, the -tablespaces parameter output now shows the new PathDropped and PathID columns to indicate whether one or more containers reside on a storage path that have been dropped and the storage path identifier for the container.

For temporary tables, the -tcbstats parameter output now shows three new SchemaNm, StoredBytes, and BytesSaved columns. Also, the -tablespaces parameter output now shows the new Max HWM column to indicate the maximum HWM for DMS table spaces since the instance was started. For SMS table spaces, the HWM and Max HWM columns do not display any value.

For partitioned tables, the -tcbstats parameter output now shows the new PartID column to indicate the data partition ID in the TCB Index Information section and the TCB Index Stats section.

db2relocatedb You can now specify in the configuration file a location for the mirrorlogpath, failarchpath, logarchmeth1, logarchmeth2, or overflowlogpath database configuration parameters. If you have set any of these database configuration parameters in the database that you want to relocate, you can specify a new location in the configuration file for any of these parameters. If you do not specify any of the new keywords, the db2relocatedb command maintains the original location as it did in previous releases.
db2secv82 The db2secv82 command is now discontinued. Use the db2extsec command instead to set the permissions for DB2 objects such as files, directories, network shares, registry keys, and services.
db2support On AIX® and Linux operating systems, if a cluster manager is installed, the db2support command now collects diagnostic data for all hosts in the cluster by default and stores the data in the TSA folder in the generated .zip file. If you specify the -cm parameter, the db2support command collects additional cluster manager data that is space intensive or takes a long time to get collected.
db2uiddl The db2uiddl command is now discontinued. This command generated a script with CREATE UNIQUE INDEX statements to convert unique indexes created on your database before DB2 UDB Version 5. If you ran the db2uiddl command after you upgraded your databases to a pre-Version 9.7 DB2 release, you do not have to run this command again before your databases are upgraded to DB2 Version 9.7.

If you are converting type-1 indexes to type-2 indexes, you are also converting the unique indexes created on your database before DB2 UDB Version 5 and you do not have to run the db2uiddl command.

db2_deinstall If you specify the -F TEXT_SEARCH parameter and you have one or more instances configured as DB2 Text Search instance services on the DB2 copy that you are uninstalling, this command returns the DBI1325E error message.
installFixPack If you have one or more instances configured as DB2 Text Search instance services on the DB2 copy that you updating, this command issues the db2ts STOP FOR TEXT command for each instance to stop the Text Search instance service. If stopping the Text Search instance service fails, the installFixPack command returns DBI1325E error message.
BIND,
DECOMPOSE XML DOCUMENT,
DESCRIBE,
EXPORT,
IMPORT,
LOAD ,
PRECOMPILE,
REBIND,
REGISTER XMLSCHEMA,
REGISTER XSROBJECT,
RUNSTATS, and
UPDATE XMLSCHEMA
Due to changes in the DB2 authorization model, the SYSADM group is no longer authorized to run these commands. Additionally, in some cases where DBADM authority used to be required, DATAACCESS authority is now sufficient. The UPGRADE DATABASE command grants DBADM authority to the SYSADM group and grants DATAACCESS authority to users holding DBADM authority including the SYSADM group so that there is no upgrade impact. However, for these commands, you should review all of the changes in authorization and grant any required authorization to users.

If you create databases in DB2 Version 9.7, grant the required authorization to users that need to run these commands. You can grant DBADM authority to the SYSADM group and grant DATAACCESS authority to users holding DBADM authority to maintain the same authorization as in previous releases.

CREATE DATABASE For new databases created on DB2 Version 9.7, the new cur_commit configuration parameter is set to ON so that currently committed behavior is enabled on cursor stability scans. A returned result set operating under cursor stability isolation level set might be different than in previous releases. See Currently committed semantics improve concurrency for details on how currently committed behavior works.

When you create a database in DB2 Version 9.7, the DB2DETAILDEADLOCK event monitor is created by default as in previous releases. However, it is deprecated and might be discontinued in a future release. You should disable DB2DETAILDEADLOCK and remove it. Use the new lock event monitor instead before the DB2DETAILDEADLOCK event monitor is discontinued. See Monitoring locking data for details.

DEACTIVATE DATABASE If you enable the read capability on HADR standby databases, this command sets the database in super exclusive mode to prevent new connections to the database and waits for all users to disconnect before stopping the database. When the last user disconnects, the database is stopped.

If you must stop the database immediately, you can issue the FORCE APPLICATIONS ALL command after the DEACTIVATE DATABASE command to end all existing connections. In previous releases, the DEACTIVATE DATABASE command stopped HADR standby databases because no user connections were allowed.

DECOMPOSE XML DOCUMENTS If you issue this new command from a Version 9.7 client, the command will complete successfully when you connect to Version 9.7 databases but it will return SQL0440N error message when you connect to Pre-Version 9.7 databases. This command calls the XDB_DECOMP_XML_FROM_QUERY system-defined procedure available in Version 9.7. Pre-Version 9.7 databases do not have the correct version of this procedure which causes this command to fail.

When you connect to Pre-Version 9.7 databases from Version 9.7 clients, use the DECOMPOSE XML DOCUMENT command instead. The DECOMPOSE XML DOCUMENTS command decomposes XML documents stored in a binary or XML column while the DECOMPOSE XML DOCUMENT command decomposes XML documents stored in files.

DESCRIBE The DESCRIBE command with the INDEXES FOR TABLE parameter now lists indexes over XML data and text search indexes in addition to relational indexes. The output displays additional columns, a lists for partitioned indexes, and a list for non-partitioned indexes. Refer to the Command Reference for details about the additional columns.

If you use the new RELATIONAL DATA INDEXES FOR TABLE parameter to list only relational indexes, the output displays the same columns as in previous releases.

The DESCRIBE INDEXES command output now shows an new INDEX PARTITIONING column to indicate whether an index is partitioned or non-partitioned.

The DESCRIBE DATA PARTITIONS command with SHOW DETAIL parameter now shows the new IndexTblSpId column to indicate the table space identifier where index data is stored.

Refer to the BIND command row for additional authorization changes that also apply to the DESCRIBE command.

EXPORT The Worksheet file format (WSF) is deprecated and support will be removed in a future release. Start using a supported file format instead of WSF before support is removed.

Refer to the BIND command row for additional authorization changes that also apply to the EXPORT command.

GET AUTHORIZATIONS The GET AUTHORIZATIONS command is discontinued in DB2 Version 9.7. Use the AUTH_LIST_AUTHORITIES_FOR_AUTHID table function instead.
GET DB CFG For HADR standby databases, this command output now shows the DATABASE value as Active Standby (if the database is read enabled) or Standby (if the database is not read enabled). In previous releases, this command showed the value DATABASE for Rollforward pending.
GET DBM CFG This command now list the values of new parameters to configure Secure Sockets Layer (SSL) support. See Table 3 for details.
GET SNAPSHOT For the TABLESPACES parameter, this command now indicates whether a DMS table space is using reclaimable storage.
IMPORT and
LOAD
You can import or load from files exported in previous releases provided that you did not export columns with user-defined and system-defined data types that are unsupported in DB2 Version 9.7. See Verifying that your databases are ready for upgrade for a list of reserved and unsupported data types.

You must also manage changes to the IMPORT and LOAD command that impact importing or loading files that you exported in previous releases. Refer to the Command Reference for details about changes to the IMPORT and LOAD command.

The Worksheet file format (WSF) is deprecated and support will be removed in a future release. Start using a supported file format instead of WSF before support is removed. After the tables are exported using a supported file format, continue to use the IMPORT and LOAD command to populate your tables.

The CREATE and REPLACE_CREATE modes of the IMPORT command are deprecated. Use DDL scripts that you developed or generated with the db2look command to create the table before you issue the IMPORT command.

Refer to the BIND command row for additional authorization changes that also apply to the DESCRIBE command.

If you issue the LOAD command with the REPLACE mode and the RESETDICTIONARY keyword on a table that has XML data in a Version 9.7 XML storage object and row compression enabled, this command now builds a compression dictionary for the XML data in addition to the dictionary for the table data. The compression dictionary for the XML data is stored in the XML storage object object.

The automatic compression dictionary creation (ADC) now builds a compression dictionary for the XML data as part of the table data population operations performed by the INSERT, IMPORT with mode INSERT, LOAD with mode INSERT, and REDISTRIBUTE DATABASE PARTITION GROUP commands.
INSPECT If you issue the INSPECT command with the ROWCOMPESTIMATE TABLE parameter on a table has XML data in a Version 9.7 XML storage object and row compression enabled, this command now builds a compression dictionary for the XML data in addition to the dictionary for the table data. The compression dictionary for the XML data is stored in the XML storage object.
LIST TABLESPACE CONTAINERS and LIST TABLESPACES These commands and related APIs have been deprecated and might be removed in a future release. Start using the MON_GET_TABLESPACE or the MON_GET_CONTAINER table functions instead. These table functions return more information than was provided by the deprecated commands and APIs. See Upgrade impact from DB2 API changes for details about the deprecated APIs.
MIGRATE DATABASE This command is deprecated. Use the UPGRADE DATABASE command instead.
REDISTRIBUTE DATABASE PARTITION GROUP If you issue this command without the NOT ROLLFORWARD RECOVERABLE parameter, ADC now builds a compression dictionary for the XML data in a Version 9.7 XML storage object on all database partitions without a dictionary as part of the table data population operations performed by this command provided that row compression is enabled. After the compression dictionary is built, XML data is compressed as well as table data.If you issue this command with the NOT ROLLFORWARD RECOVERABLE parameter, ADC now builds a compression dictionary for the XML data in a Version 9.7 XML storage object on new database partitions without a dictionary as part of the table data population operations performed by this command. ADC will not build a compression dictionary on existing database partitions that receive new data.

If you have tables with XML columns that you created in Version 9.5 or earlier releases, issuing the REDISTRIBUTE DATABASE PARTITION GROUP command returns the SQL1412N error message. You must convert the existing XML storage to the Version 9.7 format. See Converting XML storage objects to the Version 9.7 format for details.

REORG INDEXES/TABLE The LONGLOBDATA keyword now converts existing LOB data into inlined LOB data in addition to reorganizing long fields and LOB data. In previous releases, this parameter was used to reorganize long fields and LOB data. See Adopting new DB2 Version 9.7 functionality in database applications and routines for details about inlined LOB data.

The CONVERT keyword is deprecated because type-1 indexes are discontinued. You should convert your type-1 indexes to type-2 indexes before upgrading your data server. See Converting type-1 indexes to type-2 indexes for details.

If you specify the INPLACE keyword without NOTRUNCATE TABLE, you might want to adjust your outage window because the time locks are held on the table is reduced during the truncate table phase. The truncate table phase is faster than in previous releases, especially on sparsely populated tables.

If you issue the REORG TABLE command with the LONGLOBDATA keyword and the KEEPDICTIONARY or RESETDICTIONARY keyword on a table has XML data in a Version 9.7 XML storage object and row compression is enabled, this command now builds a compression dictionary for the XML data in addition to the dictionary for the table data. The compression dictionary for the XML data is stored in the XML storage object object.

REORGCHK The output of this command now includes table statistics, index statistics, and recommendations for table or index reorganization at the partition level. The output displays one line for each table and one line for each data partition only for partitioned tables.
RUNSTATS DB2 Version 9.7 now supports SYSTEM sampling on statistical views and provides improvements on the performance of BERNOULLI sampling. See Adopting new Version 9.7 functionality in upgraded databases for details.

When you run this command on tables with LOB columns, it now collects statistics for the average length of column and number of null values in a column. Refer to the Command Reference for additional details.

Refer to the BIND command row for additional authorization changes that also apply to the RUNSTATS command.

SET WORKLOAD Due to changes in the DB2 authorization model, the SYSADM group is no longer authorized to perform this command. If you do not have ACCESSCTRL, DATAACCESS, WLMADM, SECADM, or DBADM authority, you will receive an error when running this command.

On the Windows Vista operating system, to perform administration tasks that require Local Administrator authority, you must run your scripts from a DB2 command prompt with full administrator privileges. Launch the Command Window - Administrator shortcut to get a DB2 command prompt with full administrator privileges. If extended security is enabled on the Windows Vista operating system, you also need to log on to the system with a user that is a member of the DB2ADMNS group to launch this shortcut.