IBM Books

Release Notes


13.0 Quick Beginnings


13.1 Multiple Network Adapters and the db2nchg Command

Following is a pre-installation tip for inclusion in the "DB2 Enterprise - Extended Edition for Windows NT Quick Beginnings" book:

   If you are planning to use multiple network adapters, you must use the db2nchg command
   to specify the TCP/IP address for the netname field in the db2nodes.cfg file.
   For more information, refer to the Administration Guide.

13.2 Reapply the Service Pack if Any New Windows NT Components Have Been Installed

Any Windows NT component that copies an older version of any ODBC file could result in the failure of DB2 to launch properly. For example, Service Packs 3 and 4 install the following versions of the following .dll files:

   ODBCINT.DLL   version 3.0.2822
   ODBC32.DLL    version 3.0.2822

When the service pack finishes installing, it launches a pop-up window suggesting that the service pack should be reinstalled (from the original Windows NT installation CD) after any new Windows NT component is installed.

Some DB2 components (such as DB2 Universal Database Web Administration) suggest the installation of a Web server such as Microsoft Peer Web Services. When this Windows NT component is installed, it installs an older version of the following file:

   ODBCINT.DLL   version 2.50.3006

DB2 will not run if ODBCINT.DLL and ODBC32.DLL are not the same version. For example, if MS Peer Web Services is installed before the DB2 installation, an error will appear near the end of the DB2 installation, stating that the ODBC files are at different versions and need to be reinstalled. Use the service pack to install the matching DLL files.


13.3 Connecting to Windows NT DB2 UDB Server with IBM CS/NT Version 6

In order for DB2 UDB clients to be able to connect to a Windows NT DB2 UDB server with IBM CS/NT Version 6, the TP_SECURITY_BEHAVIOR field in the *.ACG file must be manually set to "IGNORE_IF_NOT_DEFINED". Security validation will be performed at the DB2 UDB level only (not at the SNA level). The default setting ("VERIFY_EVEN_IF_NOT_DEFINED") forces SNA validation, regardless of how the listening TP on the DB2 UDB Windows NT server is defined.


13.4 Syntax Error in the Migration Section

The syntax diagram in the Migration section incorrectly shows the db2iupdt command as "db2updt".


13.5 Error in the Migrating Instances Section

The following step should be removed from the section "Prepare the DB2 Instance for Migration":

   Stop the DB2 license daemon by entering the db2licm end command.

13.6 Windows NT and OS/2 Migration Information

On Windows NT, you should run the db2ckmig executable before installing DB2 Version 6.1. The db2ckmig utility checks a database to ensure that it is ready to be migrated. It is recommended that you run db2ckmig against all databases in your system before continuing the installation.

The db2ckmig.exe file is located in the \DB2\COMMON directory on the DB2 Version 6.1 CD. Command Syntax:

>>-db2ckmig----+-database-+-- -l filename ----+------------+------>
               '--e-------'                   '--u userid--'
 
>-----+--------------+-------------------------------------------><
      '--p password--'

The "-l <filename>" option allows you to specify an output file. If any errors are found, you should check the Quick Beginnings book, Appendix C, for information about possible errors and how to correct them.

Once db2ckmig has completed successfully, you should take a full offline backup of the database. Next, you can install DB2 Version 6.1. The installation process will automatically migrate the database instance and the administration instance. Once DB2 Version 6.1 has been installed, you can migrate each database:

>>-MIGRATE----+-DATABASE-+--database-alias---------------------->
              '-DB-------'
 
>-----+---------------------------------------+----------------><
      '-USER--username--+------------------+--'
                        '-USING--password--'

13.7 UNIX Platform Migration Information

The UNIX installation process does not automatically migrate the database instance for you. You can install the DB2 Version 6.1 code on UNIX without migrating Version 5 or Version 2 instances.

Once the DB2 Version 6.1 code is installed, you should log on to the system as the DB2 instance owner. Then:

step  1.    Log in as the instance owner. 
 
step  2.    Enter the following command: 
            DB2DIR/bin/db2ckmig -h -a 0 -l INSTHOME/migration.log
               where DB2DIR 
                        = /usr/lpp/db2_06_01 on AIX 
                        = /opt/IBMdb2/V6.1 on HP-UX, Solaris, or SGI IRIX 
               INSTHOME is the home directory of the instance,
               and migration.log is the name of the output file.
 
step  3.    Check the log file. The log file displays the errors that occur
            when you run the db2ckmig command. If it shows any errors,
            check the Quick Beginnings book.
 
step  4.    Check that the migration log file is empty before continuing
            with the instance migration. 
 
step  5.    Backup the database after making corrections.
 
step  6.    Run db2ckmig.

Once you have verified that the databases can be migrated, you can migrate your DB2 instances. You should stop DB2, and ensure that there are no DB2 processes still running. For more information, refer to the Quick Beginnings book, Appendix C, in the section "Prepare DB2 Instance for Migration".
Note:The steps to migrate the administration instance are the same as the steps to migrate the database instance. The only difference is that the administration instance does not have any databases, so once you have migrated the administration instance, you are done (there is no database migration).

1. Log in as user with root authority.
 
2. Run the db2imigr command as follows: 
      DB2DIR/instance/db2imigr [-d] [-a AuthType] [-u fencedID] InstName
         where DB2DIR 
                = /usr/lpp/db2_06_01 on AIX 
                = /opt/IBMdb2/V6.1 on HP-UX, Solaris, or SGI IRIX 
         and where: 
         -d 
           Sets the debug mode that you can use for problem determination.
           This parameter is optional. 
         -a AuthType 
           Specifies the authentication type for the instance.
           Valid authentication types are (SERVER), (CLIENT), and (DCS).
           If the -a parameter is not specified, the authentication type
           defaults to (SERVER), if a DB2 server is installed. Otherwise,
           the AuthType is set to (CLIENT). This parameter is optional. 
         Notes:
            1. The authentication type of the instance applies to all
               databases owned by the instance.
            2. While authentication type (DCE) is an optional parameter,
               it is not valid to choose (DCE) for this command.
         -u fencedID
           Is the user under which the fenced user-defined functions (UDFs)
           and stored procedures will execute. This parameter is optional only
           when a DB2 Run-Time Client is installed. It is required
           for all other DB2 products. It is also required if you migrate
           a Version 2 instance.
         InstName 
           Is the login name of the instance owner.
 
3. If there are any errors while verifying that all databases can be migrated,
   see Table 15 and take the suggested corrective actions.
   Then re-issue the db2imigr command.
 
The final step is to migrate each of the databases in the instance
(this step should be skipped for the administration instance).
 
To migrate databases owned by an instance, perform the following steps:
 step 1. Log on with a user ID that has SYSADM authority.
 step 2. Ensure that the databases you want to migrate are cataloged.
 step 3. Migrate the database. The syntax for the database migration is:
 
>>-MIGRATE----+-DATABASE-+--database-alias---------------------->
              '-DB-------'
 
>-----+---------------------------------------+----------------><
      '-USER--username--+------------------+--'
                        '-USING--password--'

13.8 Migration Recommendation Relating to DMS File Table Spaces

If you have a SYSCAT table space which uses a DMS file, it is recommended that the table space have approximately 70% free space for migration. Otherwise, the migration may fail with error SQL1704N (reason code 17).

The db2ckmig utility will check the SYSCAT table space to ensure that there is enough free space available for successful migration. If this error occurs even after issuing the db2ckmig command, the only solution is to restore the database backup under the Version 5 (or Version 2) instance, add more containers, and then try migration again.

You can check the size of the SYSCAT table space by issuing:

   db2 list tablespaces show detail

13.9 Administering Instances and Databases with the DB2 Administration Tools

The FMID that is used by the Control Center when you are administering an OS/390 database is JDB661D.


13.10 Monitoring Partitioned Databases

A partitioned database must contain more than one node for monitoring in Version 6.


13.11 Installing DB2 on NEC PC98 Machines Running Windows 95

When you install DB2 with documentation on an NEC PC98 running Windows 95, the installation stops at 96%. To complete the installation:

  1. End the IMQCRINS.EXE process. To end this process, press <CRTL><ALT><DELETE> to open the Task Manager. Select the IMQCRINS process and click on the End push button.

  2. When the installation has completed, reboot the system.

13.12 Uninstalling DB2 on NEC PC98 Machines Running Windows 95

If you have installed DB2 with documentation on an NEC PC98 running Windows 95, the uninstall operation stops before it has completed. To complete the uninstall operation:

  1. End the UNINSTNQ.EXE process. To end this process, press <CRTL><ALT><DELETE> to open the Task Manager. Select the UNINSTNQ process, and click on the End push button.

  2. Delete the imnnq_95 directory from the drive where DB2 was installed.

13.13 db2start on Windows NT Not Returning Correct Message

When running the db2start command (or using the NET START command) to start the database manager on the Windows NT environment, the command will not return any warnings if any communication subsystem failed to start. The user should always examine the NT Event Log or the DB2DIAG.LOG for any errors that may have occurred during the running of db2start. This occurs because the database manager on a Windows NT environment is implemented as an NT service, and hence does not return an error if the service is started successfully.


13.14 Prerequisite for APPC on AIX

The prerequisite for APPC on AIX is IBM Comm. Server 5.0.2.5 (not 5.0.2.4).


13.15 Memory Windows for HP-UX 11

Memory windows is for users on large HP 64-bit machines, who want to take advantage of greater than 1.75GB of shared memory for 32-bit applications. Memory windows makes available a separate 1GB of shared memory per process or groups of processes. This allows an instance to have its own 1GB of shared memory, plus the 0.75GB of global shared memory. If users want to take advantage of this, they can run multiple instances, each in its own window. Following are prerequisites and conditions for using memory windows:


13.16 DB2 Driver Error with Lotus Domino Go Webserver

If you are using Lotus Domino Go Webserver and get the following error:

   java.sql.SQLException: DB2 Driver error allocating environment handle, rc=-1

Restart the Web server and specify the db2instance, as follows:

   startsrc -e "DB2INSTANCE=yourInstanceName" -s httpd

Ensure that CLASSPATH and LD_LIBRARY_PATH are set correctly in the httpd.conf file (using the directives JavaClassPath and JavaLibPath respectively). Ensure that they point to the DB2 UDB Version 6.1 files that are required.


13.17 CCA Cannot Detect PCOMM on Windows NT with IBM PCI Token-Ring Adapter

If you see IBM PCI Token-Ring Adapter in the list of network adaptors on Windows NT (Start -> Settings -> Control Panel -> Network -> Adapters), make sure that you have the latest device driver for this adapter. If not, download a new driver from the following:

   http://www.networking.ibm.com/support
 
      Select IBM PCI Token-Ring Adapter
      Select Downloads
      Select -All- Operational Code
      Select NDIS Device Driver Diskette
      Select Diskette Image 

Follow the instructions on the Web to install the new driver.


13.18 Restarting a Failed Database Partition Server

In the introduction to the DB2 Enterprise - Extended Edition book, in the multiple logical nodes section, the documentation incorrectly instructs you to use the "db2start nodenum" command, or the Start Node option in the Control Center, to restart a failed database partition server. You should enter the "db2start restartnode" command, or use the Restart option in the Control Center, to restart a failed node.


13.19 Workload Transfer in the Event of Hardware or Software Failure

In the introduction to the DB2 Enterprise - Extended Edition for UNIX Quick Beginnings book, in the high availability section, the documentation notes that on AIX, High Availability Cluster Multi-Processing (HACMP) will transfer the workload from one processor to another, in the event of hardware failure. HACMP will also transfer the workload from one processor to another in the event of software failure.


13.20 Disk Requirements for Clients

In the DB2 Enterprise - Extended Edition for UNIX Quick Beginnings book, in the client components section, the table that lists the disk requirements for each client incorrectly lists the Client Configuration Assistant (CCA) as a component for each client. For this release, the CCA is only available on OS/2 and Windows 32-bit operating systems.


13.21 Estimating Fixed Disk Requirements for Servers

In the DB2 Enterprise - Extended Edition for UNIX Quick Beginnings book, in the estimating fixed disk requirements section, there is a table that lists all of the disk requirements for a server product. There is a tip attached to this table that notes the following:

   The online documentation in HTML format component will install
   the DB2 documentation in a compressed format. You may need extra
   disk space temporarily for decompression. Once you have finished the
   installation, remove the fileset to reclaim the disk space.

You should remove the fileset after you have manually decompressed and untarred it.


13.22 DB2CKMIG Reporting Potential Views that May or May Not Work After Database Migration

In Version 6, some unused columns have been removed, and new columns have been added to the catalog tables and catalog views. There is also a large number of catalog column types that have been changed from one type to another, for example from CHAR(8) to VARCHAR(128). As a result, user defined views based on catalog tables and views must be regenerated so that the column types can be changed accordingly. This view regeneration is done as part of database migration. Note that some types of user defined views will not be regenerated, and may be marked inoperative during this process. The db2ckmig utility will attempt to list all such affected views. Following is a brief description of the type of views whose regeneration may fail:

The db2ckmig utility will report the following warning for each view exhibiting one of the properties described above:

   This view references a system entity that has changed; this may affect migration.

It is recommended that you check each of your views and determine whether they have any of these properties. You should drop such views and their dependent views, because they will not work. The name of any view that cannot be regenerated is logged in the db2diag.log file during database migration.


13.23 Changes to SNA Configuration During Migration from DB2 Version 5.x to DB2 Version 6.1 When Using IBM eNetwork Communications Server for AIX (CS/AIX)

In DB2 Version 5.2 or earlier, a transaction program (TP) had to be defined in the SNA stack (CS/AIX), and the DB2 database manager configuration, for an inbound conversation. When you move to DB2 Version 6.1, you must upgrade CS/AIX to Version 5.0.2.5. Because a TP cannot be defined in this version of CS/AIX, you can remove the TP definition from CS/AIX when migrating from Version 5.x; alternatively, DB2 will delete the TP definition from the CS/AIX configuration file on the first invocation of db2start, using the TP definition defined in the database manager configuration file.


13.24 Single-User Install of DB2 for Windows NT

In previous versions of DB2 for Windows NT, the user installing DB2 had to be an administrator on the Windows NT machine. This requirement no longer applies to Windows NT Version 6 releases of DB2 clients, the DB2 Software Developer's Kit, DB2 Connect Personal Edition, and DB2 Satellite Edition. Now, even a user who does not have administrative authority for the local machine, can install and use DB2. This change applies to both the administrative and the run-time client.

Some information about DB2 that must appear in the registry must now be entered in the HKEY_CURRENT_USER folder in the registry. Although many items will be stored under the HKEY_LOCAL_MACHINE folder in the registry for single user installed DB2 products, the environment settings must be changed in HKEY_CURRENT_USER.

System shortcuts must be changed to user shortcuts for the single user install. Moreover, since services are required to install any of the single user DB2 products, but cannot be created without administrative authority, services that would be automatically started are run as processes when a non-administrator installs.

Following are known limitations:

An entry will be put into the registry for each non-administrator that has DB2 installed. These entries can be found in the registry, under HKEY_LOCAL_MACHINE\Software\IBM\DB2\Users.

Following are some specific install scenarios:


13.25 Planning for Installation

13.25.1 NetFinity Support Program Service Must Be Stopped Before Installing DB2 UDB EEE - Windows NT

The"Netfinity Support Program" service will affect the installation of DB2 UDB EEE for Windows NT when upgrading DB2 UDB.

In order to upgrade DB2 UDB EE to DB2 UDB EEE, the "Netfinity Support Program" service should be stopped before the installation of DB2 UDB EEE is begun.

13.25.2 Recommended Fix Level for ADSM on AIX

In an AIX partitioned database environment, after an online table space backup has been taken using ADSM, DB2 may fail if the database is restored.

The symptom is that the online restore fails, and the DB2 instance is brought down (traps) with the diagnostic message SIG11sqloEDUCodeTrap. The solution to this problem is to install the ADSM Client fix pack 3.1.0.x or higher.

13.25.3 Recommended Windows NT Level

For logging to raw devices with DB2 on Windows NT, Microsoft Service Pack 3 for Windows NT 4.0 is required.

A problem where Windows NT committed memory would rise to equal real memory has been fixed in Microsoft Service Pack 4.


13.26 Other Installation and Configuration Tasks

The updates in this section relate to installation and configuration tasks.

13.26.1 Problem Affecting NIS Users on AIX Versions 4.2 or Later

Note:This section is updated from the Version 5.2 Release Notes with the inclusion of the AIX Version 4.1.4 restriction. The AIX Version 4.1.5 restriction was previously documented.

On AIX Versions 4.2 or later, when a user is running Network Information System (NIS) for password authentication, the message DB21015E may be received when the command line processor times out.

The command line processor back-end program cannot recognize the user ID of the DB2 instance from the NIS master server in this case. To correct this problem:

  1. Remove the user ID from the NIS master server.

  2. Create the user ID in the /etc/passwd file locally on each machine, ensuring that the user ID is placed before the NIS magic cookie in the file. The magic cookie looks like this:
       :!::::::
    

13.27 Setting up the CCA and the Control Center in a Partitioned Database Environment (DB2 Universal Database Enterprise - Extended Edition for AIX)

For performance reasons, it is not recommended that you set discover=SEARCH on the administration server that resides on a key catalog node or Control Center node.


13.28 Considerations for Remotely Administering Clusters Using the Control Center

After you install DB2 Universal Database Enterprise - Extended Edition for Windows NT on multiple nodes, the setup process will only configure the instance-owning machine to be the co-ordinator node for communications from client machines. To remotely administer nodes using the Control Center, you will need to enable communications on each of the nodes.

You need to update the services file and specify the port that you want the server to listen on for incoming client requests from the Control Center. The services file is located in the \winnt\system32\drivers\etc directory.
Note:The location of the services file can depend on the products you have installed on your system. See your TCP/IP documentation for more information.

To enable communications on one of the nodes, reserve a TCP/IP port on each of the machines. Using a local text editor, add the Port entry to the services file for TCP/IP support. For example:

   db2cntlc    4000/tcp     # Reserved for Control Center - Coordinator function

where:

db2cntlc
is the Service name that has been set by the instance owner,

4000
is the port number, and

tcp
is the communication protocol that you are using.

13.29 DB2 SNMP Subagent

Simple Network Management Protocol (SNMP) products include IBM NetView for AIX and IBM NetView for OS/2. DB2 provides support for SNMP management products via the DB2 SNMP Subagent, included as a component of the DB2 Server. SNMP management products such as NetView allow centralized management of both hardware and software components of a system. The DB2 SNMP Subagent allows DB2 servers to be managed just like any other SNMP-managed resource.

The software requirements for using the SNMP Subagent are as follows:


13.30 ADSM Client Setup for EEE on Solaris - Use db2profile

When setting up ADSM Client for DB2 UDB Enterprise - Extended Edition for Solaris, the DSMI_DIR, DSMI_CONFIG, and DSMI_LOG ADSM environment variables should be set up in db2profile. If these variables are merely exported using .profile or .kshrc, they will not be available to each node in the partitioned database environment. The ADSM client on Solaris must be at Version 3.1 or higher.


13.31 Configuring NetBIOS on Windows NT Servers

NetBIOS on Windows NT does not properly receive data that is larger than the receive buffer. However, you can use the DB2 registry value db2nbrecvbuffsize to overcome this problem.

You need to set the receive buffer on the server to be larger than the largest amount of data that will be sent by a client. The default RQRIOBLK size is 32767 bytes, but the default server "receive buffer size" is 4096 bytes. Before you start DB2, issue the following command:

   db2set db2nbrecvbuffsize=32768 -g

This command sets the server's receive buffer size globally.


13.32 IBM DB2 Stored Procedure Builder

Welcome to the IBM DB2 Stored Procedure Builder. This section contains the latest information about Stored Procedure Builder configuration, known problems, usability, and the remote debugger.

13.32.1 Configuring DB2 UDB for Stored Procedure Builder

Before you run Stored Procedure Builder, you must configure DB2 UDB in the following ways:

13.32.2 Obtaining authorization to create stored procedures

To create stored procedures with Stored Procedure Builder, you must have the following authorizations:

To run a stored procedure so that you can test it, you must have one of the following privileges at run time:

To use the IBM Distributed Debugger to debug stored procedures built on a DB2 workstation, you need table privileges for the debug table (DB2DBG.ROUTINE_DEBUG) and the source table.

Contact your DB2 database administrator (DBA) for help in obtaining the required authorizations and privileges.

For more information about database authorizations, see IBM DB2 Administration Guide.

13.32.3 Known problems with Stored Procedure Builder

Stored Procedure Builder generates Java class and method names for stored procedure source code based on the stored procedure name you provide. This dependency might cause invalid Java class and method names to be generated. If this occurs, use the editor in Stored Procedure Builder to modify the class and method names in the source code. Rebuild the stored procedure by right-clicking on the procedure in the tree view and selecting Build. Due to a current JDK 1.1.7 restriction, stored procedures with class names, method names, or jar IDs containing non-Latin characters cannot be built successfully. For details about this problem, see bug number 4092784 at the Java Developer Connection web site (http://developer.java.sun.com).

When switching modes in the Japanese language version of Stored Procedure Builder (for example, when switching from English character input to Japanese character input), you must type text in a text buffer separate from the Stored Procedure Builder interface. After you press the Enter key, the text appears in the corresponding field in the Stored Procedure Builder interface. This is currently a Swing 1.0.3 restriction.

On double-byte character set (DBCS) systems, a backslash (\) is displayed as a path separator in Stored Procedure Builder text fields, instead of the Yen or Won symbols. This problem does not affect the behavior of Stored Procedure Builder. For details about this problem, see bug number 4238902 at the Java Developer Connection web site (http://developer.java.sun.com).

In the Korean language version of Stored Procedure Builder, Korean characters and English characters appear misaligned in the interface. This problem does not affect the behavior of Stored Procedure Builder.

In the Chinese language version of Stored Procedure Builder, English text at the end of wrapped lines in multi-line labels and pop-up information might be truncated. This problem does not affect the behavior of Stored Procedure Builder. For details about this problem, see bug number 4238902 at the Java Developer Connection Web site (http://developer.java.sun.com).

You cannot use the Stored Procedure Properties notebook to change the number of result sets that a stored procedure returns. To change the number of result sets, specify a number in the source code using the editor.

You cannot specify a new project path using the Project Properties notebook. To change the project path, save the project in a new location using File -> Save As in the Project window.

13.32.4 Unsupported items

Stored Procedure Builder does not currently support programming languages other than Java.

Stored Procedure Builder does not currently support connections to DB2 on AS/400 or OS/390.

13.32.5 Late usability information

13.32.5.1 Running Stored Procedure Builder

In order to properly run Stored Procedure Builder, you must set the DB2 path for the Java Development Kit (JDK). See "Configuring DB2 UDB for Stored Procedure Builder" in these release notes for more information.

If you do not set this parameter, you will receive the following error message when building or running a stored procedure:

[IBM][CLI Driver][DB2/NT] SQL4301N Java interpreter startup or communication failed, reason code "1". SQLSTATE=58004

You must set the DB2 parameter KEEPDARI to NO if you are frequently rebuilding and testing stored procedures. See "Configuring DB2 UDB for Stored Procedure Builder" in these release notes for more information.

If you do not set this parameter, you might experience problems building stored procedures because of a locked jar file.

13.32.5.2 SQL Assistant

In Stored Procedure Builder, you can click the Define SQL button in the Java Stored Procedure SmartGuide to launch the SQL Assistant SmartGuide. SQL Assistant automatically creates SQL statements using the conditions you provide.

To specify host variables in SQL statements created with SQL Assistant, you must prefix variable names with a colon (:) before typing any additional characters. If you add a colon to the beginning of the name after you have already typed the name, SQL Assistant interprets the name as a literal string. To check whether what you have typed is interpreted as a host variable or as a string, click on the SQL tab in SQL Assistant to view the SQL statement. Literal strings are surrounded by single quotes (').

To enter a host variable, click in one of the Value fields on the Condition page of SQL Assistant to enable the Variable button. Click the Variable button to open the Create a New Variable window. Type a leading colon and the name of your host variable and click OK.

You can enter host variables identified with a leading colon in the following fields in SQL Assistant:

13.32.5.3 Searching in the Project window

You can search for specific text in the Details View of the Stored Procedure Builder Project window using the Search toolbar button.

To search for text in the Details View:

  1. Click on the Stored Procedures folder in the tree view to select it.

  2. Click the Search toolbar button. The Search in Details View window appears.

  3. In the Search string field, type the text you want to search for in the Details View.

  4. Optional: Select the Case sensitive search checkbox to differentiate between uppercase, lowercase, and mixed case text strings.

  5. Click the Search button. Matching text is highlighted in the Details View. Click the Search button again to find the next occurrence of the specified text string. The Search in Details View window will notify you if no matches are found.

13.32.5.4 Filtering stored procedures

Single quotes (') and double quotes (") typed in the Values field of the Filter Stored Procedures window and page are treated as regular characters and not as wildcards or characters denoting literal strings. For example, if you type "procedure1" with the surrounding double quotes in the Values field of the Name comparison, Stored Procedure Builder will include the double quotes as part of the stored procedure name.

13.32.5.5 Creating stored procedures that contain static SQL (SQLJ)

SQLJ only supports SQL syntax that follows the SQL92 or earlier standards. This restriction applies to all static SQL statements in your stored procedures.

Stored procedures which contain static (SQLJ) statements must be run in FENCED mode in this release of the DB2 Universal Database.

13.32.5.6 Returning result sets

Result sets can only be returned from stored procedures running in FENCED mode. This restriction applies to stored procedures that contain either static or dynamic SQL.

To write a Java method that returns a result set, declare the method with an additional parameter that is a single-element array of the Java ResultSet class.

13.32.5.7 Building stored procedures that contain static SQL (SQLJ)

You must connect to a database using the IBM DB2 alias driver if you want to build stored procedures that include static SQL.

13.32.5.8 Stopping a build or run process

You cannot stop the build or run process for a stored procedure as described in the online help for Stored Procedure Builder. The "gears" push button is unavailable in the Progress window.

13.32.5.9 Printing from Stored Procedure Builder

The location of the cursor or the selected item in the Project window determines what will be printed when you select File -> Print.

To print the source code of a stored procedure:

  1. Right-click a stored procedure in the tree view and select Get Source to view the source code in the editor pane.

  2. Right-click in the editor pane and select File -> Print. Stored Procedure Builder prints the source code currently shown in the editor pane.

To print a summary sheet containing details about the project and individual stored procedures:

  1. Select the project folder in the tree view.

  2. Select File -> Print from the Project window. Stored Procedure Builder prints a summary sheet containing information about the project and details about each stored procedure.

    Note: Stored Procedure Builder will also print the source code for each stored procedure as part of the summary if you have previously selected Get Source for that stored procedure in the tree view.

13.32.5.10 DB2SPB.INI file additions

You can control the preservation of the temporary build directory after a build failure by editing the DB2SPB.INI file. The following line in the DB2SPB.INI file specifies whether the temporary build directory is preserved or discarded (the default is FALSE):

BUILD_KEEP_TMPDIR_AFTER_FAILURE = FALSE

You can specify whether or not error messages appear in the pop-up error console window by editing the DB2SPB.INI file. (Error messages are always written to the DB2SPB.LOG file.) The default for the following line is FALSE, specifying that the pop-up error console window will not appear:

ENABLE_STDERR_CONSOLE = FALSE

13.32.6 Remote debugging with Stored Procedure Builder

Remote debugging in Stored Procedure Builder is supported with the IBM Distributed Debugger which comes with VisualAge for Java v3.0. The Distributed Debugger consists of the debug engine and the debugger user interface. The debug engine runs on the machine executing the code you are debugging (often the server machine) and controls the code being debugged. The debugger user interface can run on any machine (often the client workstation) and provides a consistent user interface for debugging.

Note: The IBM Distributed Debugger is referenced in the online help for Stored Procedure Builder as the "VisualAge Remote Debugger."

Note: The debug table (DB2DBG.ROUTINE_DEBUG) is incorrectly referenced in the online help for Stored Procedure Builder as DB2DBG.SYS_UDFSP_DEBUG.

13.32.6.1 Setting up DB2 UDB to debug stored procedures

You must configure DB2 UDB so that you can debug stored procedures that you create with Stored Procedure Builder.

13.32.6.2 Debugger availability

Remote debugging of stored procedures with DB2 Universal Database v6.1 and Stored Procedure Builder is currently supported on the following servers:

AIX version 4.2.1
AIX version 4.3.3
Windows NT 4.0 with service pack 4

Remote debugging of stored procedures is supported on the following clients:

Windows NT 4.0 with service pack 4

The IBM Distributed Debugger supports a number of additional client and server platforms. At this time, support for debugging DB2 stored procedures is limited to the platforms listed above.

13.32.6.3 Debugger requirements

Refer to the IBM VisualAge for Java 3.0 documentation for system requirements for the IBM Distributed Debugger.

13.32.7 Running Stored Procedure Builder as an add-in from another development application

You can launch Stored Procedure Builder as a separate application from the IBM DB2 UDB program group or from within any of the following development applications:

13.32.7.1 Setting Stored Procedure Builder to run as an add-in in Microsoft Visual Basic

  1. If Microsoft Visual Basic was not installed when you installed DB2 UDB, you must perform the following steps to register the add-in with Visual Basic:

    1. Open a DOS command prompt and change to the directory x:\sqllib\bin, where x: is the drive on which you have installed DB2 UDB.

    2. Enter the following command: db2spbvb -addtoini

  2. Start Visual Basic.

  3. Select Add-Ins --> Add-In Manager. The Add-In Manager window opens.

  4. Select IBM DB2 Stored Procedure Builder.

  5. Click OK.

Stored Procedure Builder is added to the Add-Ins menu.

13.32.7.2 Setting Stored Procedure Builder to run as an add-in in Microsoft Visual C++

  1. If Microsoft Visual Studio was not installed when you installed DB2 UDB, you must perform the one of following steps to register the add-in with Visual Studio:

  2. Start Microsoft Visual C++.

  3. Select Tools --> Customize. The Customize window opens.

  4. In the Customize window, make sure that IBM DB2 Stored Procedure Builder is selected.

  5. Click Close.

The Stored Procedure Builder icon is added to the icon toolbar.


[ Top of Page | Previous Page | Next Page | Table of Contents ]

[ DB2 List of Books | Search the DB2 Books ]