Command Reference
6
6
6db2inidb - Initialize a mirrored database command
6Do not issue the db2 connect to database command
6prior to issuing the db2inidb database as
6mirror command.
6Attempting to connect to a split mirror database prior to initializing
6it erases the log files needed for roll forward recovery.
6The connect sets your database back to the state it was in when you suspended
6the database. If the database is marked as consistent at the time of the suspend, DB2 Universal Database concludes there is no need for crash recovery
6and empties the logs for future use. If this situation occurs, attempting
6to rollforward causes a SQL4970 error.
7
7
7Usage note for the db2iupdt command
7Starting with Version 8.2, when you update a DB2 Universal Database instance with the db2iupdt command, you
7must first stop any DB2 processes running against that instance.
7
7
7db2pd - Monitor and troubleshoot DB2 command
7Additional parameters for the db2pd command
7include:
7
7- -hadr
7- Reports High Availability Disaster Recovery information. Descriptions
7of each reported element can be found in the High availability disaster recovery
7section of the System Monitor Guide and Reference .
7
7- -utilities
7- Reports Utility information. Descriptions of each reported element
7can be found in the Utilities section of the System
7Monitor Guide and Reference .
7
7
7
7
7New parameter for the db2sqljcustomize command
7The db2sqljcustomize command has a new parameter.
7
7db2sqljcustomize - DB2 SQLJ Profile Customizer command
7
7
7- -storebindoptions
7- Stores the value of the -bindoptions and -staticpositioned values in the serialized profile. If these values are not specified
7when invoking the dbsqljbind tool, the values stored in the serialized profile
7are used. When the Customizer is invoked with .grp file, the values are stored in each individual .ser file. The stored values can be viewed using db2sqljprint tool.
7
7
7
7
7New parameter for the sqlj command
7The sqlj command has a new parameter.
7
7sqlj - DB2 SQLJ Translator command
7
7
7- -db2optimize
7- Specifies that the SQLJ translator generates code for a connection context
7class that is optimized for DB2 Universal Database. This option optimizes
7the code for the user defined context but not for the default context. When
7you run the SQLJ translator with this option, the DB2 Universal JDBC driver file db2jcc.jar must be in the CLASSPATH for compiling the generated Java application.
7
7
8
8
8Update to the SET CLIENT command
8The SET(TM) CLIENT command specifies connection
8settings for the back end process.
8The command parameter SYNCPOINT for this command is ignored as of Version
88. SYNCPOINT continues to be included for backward compatibility.
8
8
8Update to the PRECOMPILE command
8The PRECOMPILE command processes an application program source file containing
8embedded SQL statements. A modified source file is produced, containing host
8language calls for the SQL and, by default, a package is created in the database.
8The command parameter SYNCPOINT for this command is ignored as of Version
88. SYNCPOINT is continued to be included for backward compatibility.
8
8
8Update to the UPDATE HISTORY FILE command
8Updates the location, device type, or comment in a history file entry.
8The command parameter STATUS specifies a new status for an entry.
8Previous documentation incorrectly states that the STATUS command parameter
8can have a value of "I" to mark the entry as inactive. Valid values
8are:
8
8- A
8- Marks the entry as active.
8
8- E
8- Marks the entry as expired.
8
8
8
8
8Updates to the EXPORT and IMPORT commands
8The complete "Required connection " subsection for the EXPORT and
8IMPORT commands is as follows:
8
8Required connection
8Database. If implicit connect is enabled, a connection to the default database
8is established. Utility access to Linux, UNIX, or Windows database servers from Linux, UNIX, or Windows clients must be a direct connection
8through the engine and not through a DB2 Connect gateway or loop back.
8
8
8Update to the LOAD command
8The complete information for the INDEXING MODE parameter's AUTOSELECT value
8is as follows:
8
8INDEXING MODE
8
8
8- AUTOSELECT
8- The load utility will automatically decide between REBUILD or INCREMENTAL
8mode. The decision is based on the amount of data being loaded and the depth
8of the index tree. Information relating to the depth of the index tree is
8stored in the index object. RUNSTATS is not required to populate this information.
8AUTOSELECT is the default indexing mode.
8
8
8
8
8File type modifiers for the load utility
8The SET INTEGRITY command in the description for the "generatedoverride" modifier has been updated.
8The description for the "usedefaults" modifier has also been updated.
8The updates are as follows:
8
8
8
8Table 20. Valid file type modifiers for load: All file formats
8
8
8Modifier |
8Description |
8
8
8
8
8generatedoverride |
8This modifier instructs the load utility to accept user-supplied data
8 for all generated columns in the table (contrary to the normal rules for
8these types of columns). This is useful when migrating data from another database
8system, or when loading a table from data that was recovered using the RECOVER
8DROPPED TABLE option on the ROLLFORWARD DATABASE command. When this modifier
8is used, any rows with no data or NULL data for a non-nullable generated column
8will be rejected (SQL3116W).
8
8 Note:
8When this modifier is used,
8the table will be placed in CHECK PENDING state. To take the table out of
8 CHECK PENDING state without verifying the user-supplied values, issue the
8 following command after the load operation:
8SET INTEGRITY FOR < table-name > GENERATED COLUMN
8 IMMEDIATE UNCHECKED To take the table out of CHECK PENDING state and
8force verification of the user-supplied values, issue the following command
8after the load operation:
8SET INTEGRITY FOR < table-name > IMMEDIATE CHECKED.
8This modifier cannot be used with either the generatedmissing or the generatedignore modifier. |
8
8
8usedefaults |
8If a source column for a target table column has been specified, but
8it contains no data for one or more row instances, default values are loaded.
8Examples of missing data are:
8
8- For DEL files: two adjacent column delimiters (",,") or
8two adjacent column delimiters separated by an arbitrary number of spaces
8(", ,") are specified for a column value.
8- For DEL/ASC/WSF files: A row that does not have enough columns,
8or is not long enough for the original specification.
8
8
Note:
8For ASC
8files, NULL column values are not considered explicitly missing, and a default
8will not be substituted for NULL column values. NULL column values are represented
8by all space characters for numeric, date, time, and /timestamp columns, or
8by using the NULL INDICATOR for a column of any type to indicate the column
8is NULL. Without this option, if a source column contains no data for a row instance,
8one of the following occurs:
8
8- For DEL/ASC/WSF files: If the column is nullable, a NULL is loaded. If
8the column is not nullable, the utility rejects the row.
|
8
8
8
8
8
8File type modifiers for the import utility
8The description for the "usedefaults" and "codepage=x" modifiers
8have been updated as follows:
8
8
8
8Table 21. Valid file type modifiers for import: All file formats
8
8
8Modifier |
8Description |
8
8
8
8
8usedefaults |
8If a source column for a target table column has been specified, but
8it contains no data for one or more row instances, default values are loaded.
8Examples of missing data are:
8
8- For DEL files: two adjacent column delimiters (",,") or
8two adjacent column delimiters separated by an arbitrary number of spaces
8(", ,") are specified for a column value.
8- For DEL/ASC/WSF files: A row that does not have enough columns,
8or is not long enough for the original specification.
8
8
Note:
8For ASC
8files, NULL column values are not considered explicitly missing, and a default
8will not be substituted for NULL column values. NULL column values are represented
8by all space characters for numeric, date, time, and /timestamp columns, or
8by using the NULL INDICATOR for a column of any type to indicate the column
8is NULL. Without this option, if a source column contains no data for a row instance,
8one of the following occurs:
8
8- For DEL/ASC/WSF files: If the column is nullable, a NULL is loaded. If
8the column is not nullable, the utility rejects the row.
|
8
8
8
8
8
8
8Table 22. Valid file type modifiers for import: ASCII file formats (ASC/DEL)
8
8
8Modifier |
8Description |
8
8
8
8
8codepage=x |
8x is an ASCII character string. The value is
8interpreted as the code page of the data in the output data set. Converts
8character data from this code page to the application code page during the
8import operation.
8 The following rules apply:
8
8- For pure DBCS (graphic) mixed DBCS, and EUC, delimiters are restricted
8to the range of x00 to x3F, inclusive.
8- nullindchar must specify symbols included in the standard ASCII
8set between code points x20 and x7F, inclusive. This refers to ASCII symbols
8and code points.
8
8Notes:
8
8- The codepage modifier cannot be used with the lobsinfile modifier.
8- If data expansion occurs when the code page is converted from the application
8code page to the database code page, the data might be truncated and loss
8of data can occur.
8 |
8
8
8
7
7
7ATTACH command
7The USER parameter of the ATTACH command specifies the authentication identifier.
7When attaching to a DB2 Universal Database instance on a Windows operating
7system, the user name can be specified in a format compatible with Microsoft Windows NT Security Account Manager (SAM). The qualifier must be a NetBIOS
7style name, which has a maximum length of 15 characters. For example, domainname\username.
7
7
7RECOVER DATABASE command
7In the Examples section of the RECOVER DATABASE Command for Version 8.2
7documentation, timestamps are incorrectly formatted as yyyy:mm:dd:hh:mm:ss.
7The correct format is yyyy-mm-dd-hh.mm.ss
7
7
7UPDATE HISTORY FILE command
7
7The UPDATE HISTORY FILE command updates the location, device type, comment,
7or status in a history file entry.
7
7Updated command syntax
7![Read syntax diagram](c.gif)
7>>-UPDATE HISTORY--+-FOR--object-part-+--WITH------------------->
7 '-EID--eid---------'
7
7>--+-LOCATION--new-location--DEVICE TYPE--new-device-type-+----><
7 +-COMMENT--new-comment---------------------------------+
7 '-STATUS--new-status-----------------------------------'
7
7
7
7Updated command parameters
7
7- FOR object-part
7- Specifies the identifier for the history entry to be updated. It is
7a timestamp with an optional sequence number from 001 to 999.
7
7
Note:
7Cannot be used to update entry status. To update
7the entry status, specify an EID instead.
7
7- STATUS new-status
7- Specifies a new status for an entry. Only backup entries can have their
7status updated. Valid values are:
7
7- A
7- Active. Most entries are active.
7
7- I
7- Inactive. Backup images that are no longer on the active log chain
7 become inactive.
7
7- E
7- Expired. Backup images that are no longer required because there are
7 more than NUM_DB_BACKUPS active images are flagged as expired.
7
7- D
7- Backup images that are no longer available for recovery should be marked
7as having been deleted.
7
7
7
7
7
7
7db2updv8 - Update database to version 8 current level command
7This command updates the system catalogs in a database to support the current
7level in the following ways:
7
7- Introduces new routines shipped with the current database manager
7- Catalogs the ODBC/CLI/JDBC schema procedures as trusted procedures to
7improve performance and scalability
7- Fixes two typographical errors in the SYSPROC.SNAPSHOT_QUIESCERS table
7function's return parameters:
7
7- OUIESCER_TBS_ID corrected to QUIESCER_TBS_ID
7- OUIESCER_STATE corrected to QUIESCER_STATE
7- Fixes LOB columns' column descriptors such that "logged" bit is
7consistent with the catalog tables
7- Creates SYSIBM.SYSREVTYPEMAPPINGS view
7- Updates the view definitions for SYSSTAT.COLUMNS and SYSSTAT.TABLES
7- Updates the SYSCOLDIST.DISTCOUNT column to be updateable
7- Updates the SYSINDEXES.TBSPACEID column such that column flags are not
7set
7- Fixes parameter lengths of 17 table functions. Refer to the Column expansion for snapshot UDFs topic in the Documentation updates | SQL Administrative Routines section of the Version 8.2 Release Notes for a complete listing
7of functions
7- Alters 33 SYSPROC snapshot UDFs to THREADSAFE:
7
7- SNAPSHOT_DBM
7- SNAPSHOT_FCM
7- SNAPSHOT_FCMNODE
7- SNAPSHOT_SWITCHES
7- SNAPSHOT_APPL_INFO
7- SNAPSHOT_APPL
7- SNAPSHOT_STATEMENT
7- SNAPSHOT_LOCKWAIT
7- SNAPSHOT_AGENT
7- SNAPSHOT_SUBSECT
7- SNAPSHOT_DATABASE
7- SNAPSHOT_BP
7- SNAPSHOT_LOCK
7- SNAPSHOT_TABLE
7- SNAPSHOT_DYN_SQL
7- SNAPSHOT_TBS
7- SNAPSHOT_TBS_CFG
7- SNAPSHOT_QUIESCERS
7- SNAPSHOT_CONTAINER
7- SNAPSHOT_RANGES
7- SNAPSHOT_TBREORG
7- HEALTH_DBM_INFO
7- HEALTH_DBM_HI
7- HEALTH_DBM_HI_HIS
7- HEALTH_DB_INFO
7- HEALTH_DB_HI
7- HEALTH_DB_HI_HIS
7- HEALTH_TBS_INFO
7- HEALTH_TBS_HI
7- HEALTH_TBS_HI_HIS
7- HEALTH_CONT_INFO
7- HEALTH_CONT_HI
7- HEALTH_CONT_HI_HIS
7
7
7Required connection
7Database. This command automatically establishes a connection to the specified
7database.
7
7Command syntax
7![Read syntax diagram](c.gif)
7>>-db2updv8---d--database-name--+--------------------------+---->
7 '--u--userid---p--password-'
7
7>--+----+------------------------------------------------------><
7 '--h-'
7
7
7
7Command parameters
7
7- -d database-name
7- Specifies the name of the database to be updated.
7
7- -u userid
7- Specifies the user ID.
7
7- -p password
7- Specifies the password for the user.
7
7- -h
7- Displays help information. When this option is specified, all other
7 options are ignored, and only the help information is displayed.
7
7
7
7Example
7After installing the current level (a FixPak or a new version), update
7the system catalog in the sample database by issuing the following command:
7
7db2updv8 -d sample
7
7Usage notes
7
7- This command can be used only on a database running DB2 Universal Database Version 8.1.2 or later. If the command is issued more than once, no
7errors are reported and each of the catalog updates is applied only once.
7- To enable the new built-in functions, all applications must disconnect
7from the database and the database must be deactivated if it has been activated.
7
7
7Formatting trap files (Windows)
7A new tool, db2xprt.exe, is available to let you format trap files (*.TRP).
7This tool formats DB2 Universal Database's binary trap files into a human
7readable ASCII file. Trap files are located in the instance directory (DB2INSTPROF)
7by default or in the diagnostic data directory path if the DIAGPATH database
7manager configuration parameter is set.
7
7Authorization
7You must have access to the DIAGPATH directory.
7
7Command syntax
7
7![Read syntax diagram](c.gif)
7>>-db2xprt--+----------+--+----+--+----+--infile--+---------+--><
7 +-/p--path-+ '-/m-' '-/n-' '-outfile-'
7 '-/v-------'
7
7
7
7Command parameters
7
7
7- /p path
7- A semicolon (;) separated path that points to the location
7or locations where the binary files and PDB files are located.
7
7- /v
7- Displays version information.
7
7- /m
7- Formats a memory dump along with the rest of the trap file.
7
7- /n
7- Format data without regard to line number information.
7
7- infile
7- Specifies the input file.
7
7- outfile
7- Specifies the output file.
7
7
[ Top of Page |Previous Page | Next Page | Contents ]