UNIX | OS/2 | WIN |
|
Maximum possible size of VARCHAR (VARGRAPHIC) data type has increased from 4 000 characters (2 000 double bytes characters), to 32 672 characters (16 336 double bytes characters) in Version 6.
An application that uses fixed length buffers of 4 000 bytes for a VARCHAR (VARGRAPHIC) data type has the potential for buffer overwrite or truncation, if it fetches a VARCHAR field which is longer than 4 000 bytes into a buffer that is too small. The CLI function - SQLGetTypeInfo() now returns the size of VARCHAR as 32 672. CLI applications that use this value in table DDLs may get errors due to sufficient page size table spaces not being available.
The application should be coded, in the recommended manner, of first describing the columns of the result set by using the DESCRIBE statement, and then using buffers whose size is based on the data type's length as returned from the DESCRIBE of the column.
UNIX | OS/2 | WIN |
|
When programming using Java in Version 6, positioned UPDATE and DELETE statements use the default authorization identifier of the person that bound the cursor package. This is different from Version 5.2 where the authorization identifier of the person running the package was used.
The package containing the positioned UPDATE and DELETE statements may not run because the authorization identifier of the person who bound the package does not have sufficient authority.
The authorization identifier of the person who binds the package must be granted sufficient authority to run the positioned UPDATE and DELETE statements found in the package. Grant the correct privileges and then re-bind the package.
UNIX | OS/2 | WIN |
|
In Version 5.2, in an SQLJ program, the FOR UPDATE clause can be used in a SELECT statement to identify the columns that can be updated in subsequent positioned UPDATE statements. The syntax is changed for Version 6.
You will receive the error message SQJ0204E if a SELECT statement contains a FOR UPDATE clause.
Remove the FOR UPDATE clause from the SELECT statement. Specify an updatable iterator through the iterator declaration clause. For example:
#sql public iterator DelByName implements sqlj.runtime.ForUpdate(String EmpNo) with updateColumns = (salary);
If you want to explicitly identify what columns are updateable, specify them through the updateColumns keyword, used in conjunction with the WITH clause.
Refer to Application Development Guide for more information on positioned iterator declarations.
UNIX | OS/2 | WIN | Extended |
DB2 Universal Database Version 6 supports 128 byte table/view/alias names and 30 byte column names. The former support was for 18 byte names for each of these entities.
USER and CURRENT SCHEMA special registers were CHAR(8) and are now VARCHAR(128). The CURRENT EXPLAIN MODE special register was CHAR(8) and is now VARCHAR(254). The output for TYPE_SCHEMA and TABLE_SCHEMA built-in functions were CHAR(8) and are now VARCHAR(128).
If applications that were developed before Version 6 are run against a Version 6 database that does not utilize the longer limits, then the application behavior should not change at all. However, running these applications against a Version 6 database that does utilize longer names, could result in certain side effects, depending on how these applications were coded.
Here are some examples:
The best way to resolve problems of this type is to re-code the application to handle longer table and column names. Otherwise, ensure that these applications are not run against Version 6 databases that use > 18 byte names.
UNIX | OS/2 | WIN | Extended |
DB2 Universal Database Version 6 supports 128 byte table/view/alias names and 30 byte column names. The former support was for 18 byte names for each of these entities.
A DB2 Universal Database Version 5 client is not able to import a PC/IXF that was exported by a DB2 Universal Database Version 6 export client. The error message SQL3059N will result.
Also, a PC/IXF file (an export from a DB2 Universal Database Version 6 client) cannot be loaded into a DB2 Universal Database Version 5 database. The error message SQL3059N will result.
Always be aware of the version level of the PC/IXF file when running.
UNIX | OS/2 | WIN | Extended |
DB2 Universal Database Version 6 supports 30 byte column names. The former support was for 18 byte names. In Version 5, the documented behavior was that "0xFF" is placed in the 30th byte of an SQLNAME field for a non-doubled SQLVAR. Also in Version 5, for system-generated names and for user-specified column names specified in an "AS" clause, "0x00" is placed in the 30th byte.
In Version 6, the new behavior only returns "0xFF" in the 30th column if the name is system-generated.
Any applications that rely on the 30th-byte of the SQLNAME to determine whether it is a user-specified column name or a system-generated name may receive unexpected logic checks if the user-specifed column name is 30 characters long. This should be a rare occurrence.
These applications should be modified to only check for "0xFF" in the 30th byte of the SQLNAME field if the length of the SQLNAME is less than 30. In this case, the name is user-generated.
WIN |
When moving from version to version, you can change the behavior of the DB2 CLI/ODBC driver by specifying a set of optional keywords in the db2cli.ini file.
In Version 6, the TRANSLATEDLL and the TRANSLATEOPTION keywords became obsolete.
These keywords will be ignored if they still exist. You may notice behavioral changes based on the removal of these settings.
You will need to review the new list of valid parameters to decide what the appropriate keywords and settings are for your environment. See the CLI Guide and Reference for information on these keywords.
UNIX | OS/2 | WIN | Extended |
Event monitor output streams have no version control. As a result, adding support for the greater than 18 byte table names requires the move to an output stream format.
Applications that parse the event monitor output streams will no longer function as in previous releases.
There are two options: