IBM DB2 UDB Version 8 Update Considerations

download IBM DB2 UDB Version 8 Update Considerations

of 7

description

DB2 UDB Version 8.2 updateconsiderations

Transcript of IBM DB2 UDB Version 8 Update Considerations

  • DB2 UDB Version 8.2 updateconsiderations

    Preventive Service Planning

    AbstractThis document covers the changes and conversions that happen when youinstall DB2 UDB Version 8.2 (DB2 UDB Version 8.1 FixPak 7) or a higher levelon a server that already has DB2 UDB Version 8.1 (up to FixPak 6 level)installed.

    Content

    There is no migration when you install a different level of DB2 Universal Database (DB2 UDB),Version 8. However, when you install DB2 UDB Version 8.2 (DB2 UDB Version 8.1 FixPak 7) orhigher level on a server that has already installed DB2 UDB Version 8.1 up to FixPak 6 level, there arechanges and conversions that might impact your application performance and behavior.

    These are the most important changes that you need to know before you install DB2 UDB Version 8.2:

    Changes to database directory and registry variables

    Changes to the database and database manager configuration parameters

    Changes to DB2 database objectsChanges to DB2 development support and tools

    Troubleshooting information

    After you install DB2 UDB Version 8.2, perform the following tasks to update your instance to the newinstalled level and update your database system catalogs to support new functionality:

    Update instances

    After you install DB2 UDB Version 8.2 on UNIX or Linux operating systems, issue the db2iupdt command to updateyour DB2 instance to run under this installation:

    $ $DB2DIR/instance/db2iupdt db2inst1

    where DB2DIR is set to the directory where the new level of DB2 UDB is installed. For example, if you installed DB2 UDBVersion 8.2, DB2DIR represents /usr/opt/db2_08_02 on AIX, and /opt/IBM/db2/V8.2 on all other UNIX operating systems.

    In Linux and UNIX operating environments where the -w 64 option is supported, use this option to convert 32-bit instances to64-bit instances:

    $ $DB2DIR/instance/db2iupdt -w 64 db2inst1

    On Windows operating systems, run this command only to update from a single-partition instance to a partitioned databasesystem.

    DocumentinformationDB2 for Linux, UNIX andWindows

    Installation - Fix Pack

    Software version:8

    Operating system(s):AIX, HP-UX, Linux,Solaris, Windows

    Reference #:1223978

    Modified date:2011-04-17

    IBM DB2 UDB Version 8.2 update considerations - United States http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21223978

    1 of 7 23/06/2012 10:06 a.m.

  • Update the DB2 Administration Server (DAS)

    After you install DB2 UDB Version 8.2 on UNIX or Linux operating systems, update the DAS if you want to administerremotely instances running on this fix pack level. Issue the dasupdt command:

    $ $DB2DIR/instance/dasupdt dasuser

    Where $DB2DIR is set to the directory where the new level of DB2 UDB is installed.

    Update databases to DB2 UDB Version 8.2

    After you install DB2 UDB Version 8.2 on Windows or update your instances on UNIX or Linux, update the system catalog inyour databases to support this level by issuing the db2updv8 command:

    $ db2updv8 -d sample

    This command can be used only on a database running DB2 UDB Version 8.1 FixPak level 2 or later.

    Once you have run the db2updv8 command to update the system catalogs to the current DB2 UDB Version 8.2 level, youcan not run the db2demigdbd utility to reverse to DB2 UDB Version 8.1.

    Rebind packages

    After you install DB2 UDB Version 8.2, some packages may be marked as invalid. Packages will be implicitly rebound thefirst time an application uses them. To eliminate this overhead and to ensure that rebind is successful, you can manually rebindall packages after the installation is complete using the db2rbind command:

    $ db2rbind sample -l logfile all

    The readme file might contain specific instructions for specific packages that you must rebind.

    Extended security (Windows)

    If extended security is enabled, add users to the DB2ADMNS or the DB2USERS groups to give them access to your DB2server. Review the Adding your user ID to the DB2ADMNS and DB2USERS user groups topic for details.

    Back to top

    Changes to database directory format

    As part of the automatic client reroute feature, the format of database directory files has beenchanged. The database directory files are updated automatically when you install DB2 UDB Version8.2. However, if you need to move back from DB2 UDB Version 8.2 to DB2 UDB Version 8.1, youmust use the db2demigdbd utility to convert your database directory files from the DB2 UDBVersion 8.2 format to the DB2 UDB Version 8.1 format.

    The db2demigdbd utility only converts the database directory files, any features enabled ordatabase objects created in DB2 UDB Version 8.2, such as SQL procedures, will not work in DB2UDB Version 8.1. You need to recreate these objects and discontinue the use of any new features inDB2 UDB Version 8.2. You also need to update the instance and update the database to DB2 UDBVersion 8.1 level.

    Multipage file allocation on SMS table spaces enabled by default

    Databases created by the CREATE DATABASE command have multipage file allocation (MPFA)enabled, this means that Systems Managed Space (SMS) table space files are extended one extentat a time by default.

    Once MPFA is enabled for a database, it cannot be disabled. You can set theDB2_NO_MPFA_FOR_NEW_DB registry variable to "Yes" to create databases with MPFAdisable, in which case the database manager allocates one page at a time.

    $ db2set DB2_NO_MPFA_FOR_NEW_DB=YES

    DB2NTNOCACHE registry variable is deprecated

    If you have set this variable in DB2 UDB Version 8.1, you can use the NO FILE SYSTEMCACHING clause on the CREATE TABLESPACE or the ALTER TABLESPACE statement tobypass the file system level cache on all I/O operations.

    $ db2 ALTER TABLESPACE tbs-nameNO FILE SYSTEM CACHING

    DB2_COLLECT_TS_REC_INFO registry variable has new default value

    The new default value for DB2_COLLECT_TS_REC_INFO is ON. When rolling forward a table

    IBM DB2 UDB Version 8.2 update considerations - United States http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21223978

    2 of 7 23/06/2012 10:06 a.m.

  • space, this new setting indicates to skip the log files without any log records affecting that tablespace. The current documentation incorrectly specifies the default for this variable as OFF.

    DB2NOLIOAIO registry variable replaced by DB2LINUXAIO (Linux)

    The registry variable DB2NOLIOAIO is deprecated as of DB2 UDB Version 8.1 FixPak 9 (Version8.2.2). It has been replaced with DB2LINUXAIO. To enable asynchronous I/O (AIO) support onLinux, run the following command:

    $ db2set DB2LINUXAIO=true

    New communication registry variable DB2RSHCMD

    Starting with DB2 UDB Version 8.1 FixPak 9, the remote shell mechanism can be configured forpartitioned databases through the new registry variable DB2RSHCMD. This registry variable allowsyou to specify the full path name of a more secure remote shell command, for example /usr/bin/ssh.Default=rsh(remsh on HP-UX).

    Setting the DB2WORKLOAD registry variable to SAP

    If you set the DB2WORKLOAD variable to SAP, the user table space SYSTOOLSPACE and theuser temporary table space SYSTOOLSTEMPSPACE are not automatically created. These tablespaces are used by certain tools and routines. For details on the tools and routines that need thesetable spaces and how to manually create them, refer to the documentation updates in DB2 UDBVersion 8.1 FixPak 9 Release Notes.

    Automatic client reroute configuration

    By default, the automatic client reroute feature retries the connection to a database repeatedly for upto 10 minutes. You can use the DB2_MAX_CLIENT_CONNRETRIES registry variable toconfigure the maximum number of connection retries attempted by automatic client reroute andDB2_CONNRETRIES_INTERVAL to configure the sleep time between consecutive connectionsretries. For details, refer to documentation updates DB2 UDB Version 8.1 FixPak 11 ReleaseNotes.

    Back to top

    New configuration parameters for log file allocation, removal, and archiving

    Two new database configuration parameters, logarchmeth1 and logarchmeth2, have been added tohandle log file allocation and removal. These two parameters replace the userexit and logretainconfiguration parameters.

    If you have set the logretain configuration parameter to RECOVERY, thelogarchmeth1configuration parameter is set to LOGRETAIN automatically. Also, if you have setthe userexit configuration parameter to ON, the logarchmeth1configuration parameter is set toUSEREXIT automatically. If you have set both logretain and userexit configuration parameters, thelogarchmeth1configuration parameter is set to USEREXIT.

    Although these new parameters are automatically set when you modify the value of the userexitandlogretain configuration parameters, you should start using these new parameters from now on.

    Memory Changes in DB2 UDB Version 8.2

    If you set the instance_memory database manager configuration parameter to AUTOMATIC, thedatabase manager calculates the amount of instance memory needed for the current configuration.The database manager also allocates additional memory for an overflow buffer. This overflowbuffer is used to satisfy peak memory requirements for any heap in the instance shared memoryregion whenever a heap exceeds its configured size.

    In the same manner, if you set the database_memory database configuration parameter toAUTOMATIC, the database manager also calculates the amount of database shared memory andallocates additional memory for an overflow buffer.

    IBM DB2 UDB Version 8.2 update considerations - United States http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21223978

    3 of 7 23/06/2012 10:06 a.m.

  • The recommendation for the new instance memory requirements is to increase theinstance_memory parameter by 20%. If you set this parameter to AUTOMATIC, you only need toensure that your system has available the additional memory requirement.

    For database shared memory requirements, the recommendation is to increase thedatabase_memory parameter by 20% plus the value of pckcachesz. If you set thedatabase_memory parameter to AUTOMATIC, you only need to ensure that your system hasavailable the additional memory requirement.

    $ db2 UPDATE DB CFG FOR sample USING database_memoryAUTOMATIC

    The db2pd utility can be used to retrieve statistics from a running instance or database such asmemory pools and sets. The option osinfo provides shared memory information for UNIXoperating systems. The -memsets option monitors the amount of unused memory left in theoverflow buffer.

    $ db2pd -d sample -memset -osinfo

    The pckcachesz database configuration parameter is allocated out of the database shared memory,and is used for caching of sections for static and dynamic SQL statements on a database. In apartitioned database system, there is one package cache for each database partition. Thisconfiguration parameter has also additional memory requirements. In average you can expect anincrease of 30% to 50%, the recommendation is to increase your current value by 50 %.

    $ db2 UPDATE DB CFG FOR sample USING pckcachesz 1.5*value

    New default value for util_impact_lim configuration parameter

    The default value of the util_impact_lim (Instance impact policy) database manager configurationparameter changes from 100 to 10. The previous default value of 100 indicated that no utilityinvocations are throttled and that the utilities can have an arbitrary impact on the workload. The newdefault value of 10 indicates that a throttled utility invocation will not impact the workload by morethan 10 percent.

    Health registry changes

    The Health registry is modified when you migrate to DB2 UDB Version 8.2. The HealthRules.regfile that contains your current settings is converted to the HealthRules2.reg file. Any registrychanges made once you migrated to DB2 UDB Version 8.2 level are lost when you migrate back toDB2 UDB Version 8.1.

    The health_mon database manager configuration parameter is turned on by default in DB2 UDBVersion 8.2. This causes an agent to collect information about the health of the objects you haveselected. If you do not want to monitor the health of objects by default as in DB2 UDB Version 8.1,you should set the health_monconfiguration parameter to OFF.

    $ db2 UPDATE DBM CFG USING health_mon OFF

    Back to top

    SQL procedures no longer require a C or C++ compiler

    New in DB2 UDB Version 8.2, the creation of SQL procedures does not require a C or C++compiler on the server. When you create an SQL procedure its procedural statements are convertedto a native representation that is stored in the database catalogs. When an SQL procedure is called,the native representation is loaded from the catalogs and the DB2 engine executes the procedure.

    The SQL procedures that you created in DB2 UDB Version 8.1 are not converted to this nativerepresentation. You need to drop and create your SQL procedures again if you want to convertthem. Your SQL procedures will continue to run in the same manner, except when you update froma DB2 UDB Version 8.1 32-bit instance to a DB2 UDB Version 8.2 64-bit instance. In this case youmust drop and recreate your SQL procedures after you update to Version 8.2.

    You can use the db2look tool to generate a DDL script for all your database objects. Then edit thisscript to use only the DDL statements to recreate your SQL procedures. Here is an example on

    IBM DB2 UDB Version 8.2 update considerations - United States http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21223978

    4 of 7 23/06/2012 10:06 a.m.

  • how to generate a DDL script for all the objects in the sample database:$ db2look -d sample -e -o db2look.sql

    The db2demigdbd utility only converts your database directory files to the DB2 UDB Version 8.1format. For all the SQL procedures that you created in DB2 UDB Version 8.2, you need to recreatethem in DB2 UDB Version 8.1. Also if you created a database in DB2 UDB Version 8.2, all systemdefined SQL procedures will not run in DB2 UDB Version 8.1 and need to be recreated.

    Changes to IMPORT utility

    Starting with DB2 UDB Version 8.1 FixPak 9, the import utility now creates indexes using thedefinition in the IXF file to enable or disable reverse scans of indexes. Prior to Version 8 FixPak 9,when importing an IXF file from a Version 8.1 client, reverse scans of indexes were disabled bydefault on Version 8 servers.

    SQL statement size limit increased to 2 MB

    DB2 UDB Version 8.2 provides an increased SQL statement size limit of 2 MB. This new limitallows you to use larger statements when creating objects such as SQL stored procedures, SQLuser defined functions and triggers. If you ran into this limitation when creating any of thesedatabase objects, you can take advantage of this new limit.

    Changes to database packages for external routines

    Starting DB2 UDB Version 8.1 FixPak 13, the information in packages for C/C++, COBOL, OLEand OLEDB routines has changed. Although existing packages for those external routines willcontinue to work, this change impacts package performance. The packages for JAVA and CLRroutines are not affected by this change. If you did not perform the task to rebind all databasepackages after applying the FixPak, you should rebind the packages for your external routines toensure optimum performance.

    Changes to catalog functionsIn DB2 UDB Version 8.1 FixPak 15, the catalog function SQLTables has changed to resolve a lockissue with PeopleSoft applications. In DB2 UDB Version 8.1 FixPak 13, the catalog functions havechanged to support new columns added to JDBC methods in JDK 1.4. If you are using catalogfunctions for querying system catalog information in CLI applications, you must rebind using thedb2schema.bnd file in all existing databases after applying one of these FixPaks on a DB2 server. Ifyou performed the task to rebind all database packages after applying the FixPak, you do not needto explicitly rebind the db2schema.bnd file.

    Direct I/O on block devices (Linux)

    Direct I/O is now supported on both file systems and block devices for distributions of Linux witha 2.6 kernel. Direct I/O on block devices is an alternative way to specify table space containers fordirect disk access or for raw I/O. The performance of Direct I/O is equivalent to the raw characterdevice method.

    Although the raw I/O method is still supported by DB2 UDB, it has been deprecated. Therecommendation is to convert your table space container to direct I/O on block devices beforesupport for the raw I/O method is dropped.

    Dropped Table Recovery feature ON by default

    For a dropped table to be recoverable, the table space in which the table resides must have theDROPPED TABLE RECOVERY option turned on which can be done when you execute theCREATE TABLESPACE or the ALTER TABLESPACE statements.The default value used to beOFF.

    Migration to DB2 UDB Version 8 will not change the settings in your existing table spaces, howeverthe new default value will apply to new table spaces that you create. If you drop tables veryfrequently, you must consider the overhead on performance during recovery and the additionalspace required to store the information in the history file and the log files.

    Changes to the explain facility tables

    In DB2 UDB Version 8.2, there are changes to the existing explain facility tables including the newtables ADVISE_MQT and ADVISE_PARTITION.

    If you want to maintain explain table information that you previously gathered prior to DB2 UDBVersion 8, use the db2exmig command to convert your existing explain tables to DB2 Version 8.2.This command creates the new explain tables using the EXPLAIN.DLL file, and copies the content

    IBM DB2 UDB Version 8.2 update considerations - United States http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21223978

    5 of 7 23/06/2012 10:06 a.m.

  • of your existing explain tables.

    $ db2exmig -d db -e eschema [-u id password]

    If you are applying DB2 UDB Version 8.1 FixPak 9 or higher to a DB2 UDB Version 8.2 FixPak 1(equivalent to Version 8.1 FixPak 8) or lower, to be able to run the EXPLAIN.DDL to create theexplain tables, you must run the db2updv8 command first. This is one of the recommended tasksat the beginning of this article after installing a higher FixPak level.

    Back to top

    JDK support

    When you install DB2 UDB Version 8, the latest supported version of the IBM SoftwareDevelopment Kit (SDK) is installed provided that another level of IBM SDK is not already installed,unless the DB2 UDB installation is an update of a previous DB2 UDB Version 8 installation. Youmust also ensure that the JDK_PATH database configuration parameter is set to the install path forthe IBM SDK for Java (path):

    $ db2 update dbm cfg using JDK_PATH path

    DB2 UDB Version 8.1 FixPak 9 includes the IBM SDK for Java 1.4.2 on all DB2 UDB supported32bit and 64bit operating system environments. For details about the supported Java SDKs andthe supported operating system environments, visit the Java application development page.

    Support for the DB2 Universal JDBC Driver Type 2

    DB2 UDB Version 8.1 FixPak 9 on Linux AMD64 does not support the DB2 Universal JDBCDriver Type 2. Support is available starting with DB2 UDB Version 8.1 FixPak 10. JDBC support inDB2 UDB Version 8.1 FixPak 9 is available using the DB2 Universal JDBC Driver Type 4 and theLegacy JDBC Type 2 driver (COM.ibm.db2.jdbc.app.DB2Driver).

    Support for the DB2 Universal JDBC Driver Type 4

    The DB2 Universal JDBC Driver does not support type 4 connectivity to DB2 for VM/VSEdatabases. Topics in the DB2 UDB Information Center incorrectly state that the DB2 UniversalJDBC Driver supports type 4 connectivity to DB2 for VM/VSE databases. See documentationupdates in DB2 UDB Version 8.1 FixPak 11 Release notes for details.

    New command editor tool

    In DB2 UDB Version 8.2, the Command Center is replaced by the Command Editor. TheCommand Editor includes all the function previously available with the Command Center, butprovides these functions in a simplified interface.

    Importing and saving scripts to and from DB2 UDB Version 7 servers is not possible. Any utilityrequiring an ATTACH will not work.

    Back to top

    Recommended and validated Linux environments for DB2 UDB Version 8.2Recommended environments are used for building, testing, and deploying DB2 UDB. WhileValidated environments have undergone a rigorous set of compatibility tests that give IBM theconfidence to officially support DB2 UDB on those environments.

    Known issues for DB2 on AIX 4.3.3, 5.1, 5.2, and 5.3This document lists APARs and issues for which the problem relates to DB2 UDB Version 8, DB2Version 9 and AIX interaction.

    IBM DB2 UDB Version 8.2 update considerations - United States http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21223978

    6 of 7 23/06/2012 10:06 a.m.

  • Performance considerations for table space containers created on JFS file systemsIf you upgraded your system from AIX 4.3 to 5.1 or 5.2, you must be aware of a change in JFSread ahead operations that can impact on DB2 servers read performance in certain configurations.

    DB2 UDB Version 8.2 technotesThis is a search on the DB2 support site for relevant technotes about known issues for DB2 UDBVersion 8.2.

    DB2 UDB support siteYou can view news alerts, FAQs, Redbooks, White papers, presentations, and hints and tips on theDB2 UDB support site.

    Back to top

    Related informationDB2 UDB Version 7 to Version 8 migration FAQDB2 UDB Version 8.1 FixPak 7b (8.2) Release NotesHighlights of DB2 UDB Version 8.2Version 8 incompatibilities with previous releasesDB2 UDB Version 8 Database Update Roadmap - db2updv8From non-partitioned to partitioned environment V8.2DB2 UDB Version 8.1 FixPak 13 (Version 8.2 FixPak 6)Db2 UDB Version 8.1 FixPak13 (FP11) Release Notes

    Cross Reference informationSegment Product Component Platform VersionEdition

    InformationManagement

    DB2 forLinux-UNIX andWindows

    Installation - InitialConfiguration

    AIX,HP-UX,Linux,Solaris,Windows

    8

    InformationManagement

    DB2 forLinux-UNIX andWindows

    DatabaseConfiguration -DatabaseConfiguration(db cfg)

    AIX,HP-UX,Linux,Solaris,Windows

    8

    InformationManagement

    DB2 forLinux-UNIX andWindows

    DatabaseConfiguration -Registry Variables

    AIX,HP-UX,Linux,Solaris,Windows

    8

    Copyright and trademark informationIBM, the IBM logo and ibm.com are trademarks of International BusinessMachines Corp., registered in many jurisdictions worldwide. Other product andservice names might be trademarks of IBM or other companies. A current listof IBM trademarks is available on the Web at "Copyright and trademarkinformation" at www.ibm.com/legal/copytrade.shtml.

    IBM DB2 UDB Version 8.2 update considerations - United States http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21223978

    7 of 7 23/06/2012 10:06 a.m.