Requirements for using the Application Server with DB2
Upcoming SlideShare
Loading in...5
×
 

Requirements for using the Application Server with DB2

on

  • 523 views

 

Statistics

Views

Total Views
523
Views on SlideShare
523
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Requirements for using the Application Server with DB2 Requirements for using the Application Server with DB2 Document Transcript

  • WebSphere Application Server for OS/390 Requirements for using the Application Server with DB2
  • WebSphere Application Server for OS/390 Requirements for using the Application Server with DB2
  • ii WebSphere Application Server for OS/390: Requirements for using the Application Server with DB2
  • Contents | Chapter 1. Introduction . . . . . . . . 1 DB2 Hints and Tips . . . . . . . . . . . . 7 Customizing Recoverable Resources Management Chapter 2. Using the Application Server Services (RRS) . . . . . . . . . . . . . 7 Customizing SQLJ/JDBC run-time properties files 7 with DB2 for OS/390 or DB2 UDB for Setting up a CLI initialization file for DB2 Version OS/390 . . . . . . . . . . . . . . . 3 5 for OS/390 . . . . . . . . . . . . . 7 Installing DB2 . . . . . . . . . . . . . . 4 Setting up an ODBC file for DB2 UDB for OS/390 Installing a JDBC driver . . . . . . . . . . 4 Version 6 . . . . . . . . . . . . . . 8 Installing the Application Server . . . . . . . . 5 Enabling the Application Server to locate and Index . . . . . . . . . . . . . . . . 9 communicate with DB2 . . . . . . . . . . . 6 Setting up DB2 tables . . . . . . . . . . . 7 iii
  • iv WebSphere Application Server for OS/390: Requirements for using the Application Server with DB2
  • | | Chapter 1. Introduction | This document applies to WebSphere Application Server for OS/390 Versions 1.1, | 1.2 and 3.02, and DB2 for OS/390 Versions 5 and 6. | The most current version of this document is available on the following Web site: | http://www.ibm.com/software/websphere/appserv/library_390.html | Customer feedback is important to us. If you have comments about this document, | you can e-mail them to twaseedoc@us.ibm.com or fax them to 919–254–0206. Please | be sure in include the full title of this document in all correspondence. | When you send information to IBM, you grant IBM a nonexclusive right to use or | distribute the information in any way it believes appropriate without incurring any | obligation to you. 1
  • 2 WebSphere Application Server for OS/390: Requirements for using the Application Server with DB2
  • Chapter 2. Using the Application Server with DB2 for OS/390 or DB2 UDB for OS/390 In order for the Application Server to use DB2 for OS/390, you must: v Install one of the following DB2 products: – DB2 for OS/390 Version 5 – DB2 for OS/390 Version 6 v Install the DB2 JDBC driver. The Application Server supports both the DB2 JDBC Type-1 driver as well as the recently released DB2 SQLJ/JDBC Type-2 driver. The DB2 SQLJ/JDBC Type-2 driver is now available via DB2 Version 5 PTF UQ41618 or DB2 Version 6 PTF UQ41672. If you have not applied either of these PTFs to your DB2 JDBC driver, then you should follow the instructions for the JDBC ″Type-1″ driver. If you have applied these PTFs, then you should follow the JDBC ″Type-2″ instructions. v Install a version of the Application Server if one is not already available on your system. (Version 1.1 of the Application Server is integrated in OS/390 Releases 7 and 8 and Version 1.2 is integrated in OS/390 Release 9.) Note: If you want to use the Application Server Connection Manager to provide the data connections between DB2 and the Application Server, you must have Application Server Version 1.2 or 3.02 installed on your system and define the connection pools that are to be used. Because defining Connection Manager connection pools requires changes to the the Application Server was.conf file, you may want to perform this task before stopping and starting the Web server. WebSphere Application Server for OS/390: Application Server Planning, Installing and Using, Version 1.2 and WebSphere Application Server for OS/390: WebSphere Application Server Standard Edition Planning, Installing and Using, Version 3.02 describes how to define Connection Manager connection pools. A copy of these publications can be found on the following Web site: http://www.ibm.com/software/websphere/appserv/library.html v Update the Application Server and Web server configuration files to enable the Application Server to locate and communicate with DB2. v Set up DB2 tables to contain the data the servlets require. v Stop the Web server. v Start the Web server. When the Web server starts, the changes made in the Application Server and Web server configuration files will become effective and DB2 and the Application Server should be able to communicate with each other. You may want to invoke a servlet that uses the DB2 database at this time to ensure that a proper interface has been established. 3
  • Installing DB2 If DB2 for OS/390 is already installed on your OS/390 system, see “DB2 Hints and Tips” on page 7 for information about RRS customization. If you are using the DB2 JDBC Type-1 driver, then you may also want to see DB2 Hints and Tips on page 5 for information about CLI (ODBC) initialization file setting requirements when using DB2 with the Application Server. CLI (ODBC) is not used by the DB2 JDBC Type-2 driver. If DB2 for OS/390 is not already installed on your OS/390 system: v DB2 for OS/390 Program directory, and the DB2 for OS/390 V5 Installation Guide describe how to install DB2 for OS/390 Version 5. v IBM Database 2 Universal Database Server for OS/390 Program Directory, Volume 1, and DB2 UDB for OS/390 V6 Installation Guide describe how to install DB2 UDB for OS/390 Version 6. The DB2 program directories are shipped with the respective products. All of the other documents can be accessed by entering the following URL from your browser and then selecting the appropriate version of DB2: http://www.ibm.com/software/data/db2/os390/library.html Once you have installed DB2 on your OS/390 system, see “DB2 Hints and Tips” on page 7 for information about RRS customization. If you have not applied PTF UQ41618 to your JDBC driver, you may also want to see “DB2 Hints and Tips” on page 7 for information about CLI initialization file setting requirements when using DB2 with the Application Server. CLI is not required if you have applied this PTF. Installing a JDBC driver If a DB2 JDBC driver is already installed on your OS/390 system, see “Enabling the Application Server to locate and communicate with DB2” on page 6 for a description of what needs to be done to ensure that the Application Server knows where to find it. Note: If you have not already done so, you may want to apply PTF UQ41618 to DB2 Version 5 or PTF UQ41672 to DB2 Version 6. These PTFs will change your DB2 JDBC driver from Type-1 to Type-2 and will eliminate the need for CLI. If a DB2 JDBC driver in not already installed on your OS/390 system, DB2 for OS/390 V5 Application Programming Guide and Reference for JAV and DB2 UDB for A, OS/390 V6 Application Programming Guide and Reference for JAV describe how to A, install a JDBC driver for DB2 Versions 5 and 6 respectively. To access either of these documents, enter the following URL from your browser and then select the version of DB2 that you will be using with the JDBC driver: http://www.ibm.com/software/data/db2/os390/library.html When JDBC installs, it creates a Samples subdirectory on the JDBC driver which contains JDBC samples. Have your DB2 Administrator update these samples with your system-specific information, such as the location of DB2, the correct URL, and so forth and have him give you authority to use them. Then run one of the samples before starting the Web server. v If the sample runs successfully and JDBC can access the DB2 data, this indicates you have successfully installed and configured the DB2 JDBC driver. 4 WebSphere Application Server for OS/390: Requirements for using the Application Server with DB2
  • v If the sample does not run successfully, there is probably a problem with your JDBC installation that your DB2 Administrator needs to fix before the Web server is started. For more information about updating and running these samples and how to use DB2 for OS/390 JDBC when writing Java applications, see eitherDB2 for OS/390 V5 Application Programming Guide and Reference for JAV or DB2 UDB for OS/390 V6 A, Application Programming Guide and Reference for JAVA. Installing the Application Server If a version of the Application Server is already installed on your OS/390 system, see “Enabling the Application Server to locate and communicate with DB2” on page 6 for a description of the changes that need to be made to the Application Server and Web server configuration files. If a version of the Application Server is not already installed on your OS/390 system: v For OS/390 Releases 5 and 6, you can install Version 1.2 from the following download site: http://www.ibm.com/software/websphere/appserv/download_v12.html The Application Server V1.2 Program Directory, and the WebSphere Application Server for OS/390: Application Server Planning, Installing, and Using, Version 1.2 describe how to install this version of the Application Server. Versions 1.1 is no longer available as a download for these releases. v For OS/390 Releases 7 and 8: – Version 1.1 is an integrated part of the product. The OS/390 V2R7.0 Program Directory, the OS/390 V2R8.0 Program Directory, and the WebSphere Application Server for OS/390: Application Server Planning, Installing, and Using, Version 1.1 describe how to install this version of the Application Server for these releases. – Version 1.2 can be installed from the following download site: http://www.ibm.com/software/websphere/appserv/download_v12.html The Application Server V1.2 Program Directory, and the WebSphere Application Server for OS/390: Application Server Planning, Installing, and Using, Version 1.2 describe how to install this version of the Application Server. – Version 3.02 is a part of the WebSphere Application Server for OS/390 product. The WebSphere Application Server for OS/390 Program Directory and the WebSphere Application Server for OS/390: WebSphere Application Server Standard Edition Planning, Installing, and Using, Version 3.02 describe how to install this version of the Application Server. v For OS/390 Release 9: – Version 1.2 is an integrated part of the product. The OS/390 V2R9 Program Directory and the WebSphere Application Server for OS/390: Application Server Planning, Installing, and Using, Version 1.2 describe how to install this version of the Application Server. – Version 3.02 is a part of the WebSphere Application Server for OS/390 product. The WebSphere Application Server for OS/390 Program Directory and the WebSphere Application Server for OS/390: WebSphere Application Server Standard Edition Planning, Installing, and Using, Version 3.02 describe how to install this version of the Application Server. Chapter 2. Using the Application Server with DB2 for OS/390 or DB2 UDB for OS/390 5
  • All of this documentation can be accessed by entering the following URL from a browser and then selecting Version 1.1, 1.2 or 3.02: http://www.ibm.com/software/websphere/appserv/library.html Enabling the Application Server to locate and communicate with DB2 Before DB2 can be used to store data required by servlets running under the Application Server, the Application Server must be able to locate and communicate with DB2. To set up communication between DB2 and the Application Server you | must: | 1. Set one of the following properties to the boolean value True to enable the | System Classpath value to be appended to the Java Classpath: | v For Version 1.1, the ncf.jvm.use.system.classpath property in the was.conf | file. This file is located in the applicationserver_root/properties directory. | v For Version 1.2, the ncf.jvm.use.system.classpath property in the was.conf | file. This file is located in the server_model_root/properties directory. | v For Version 3.02, the appserver.usesystemclasspath property in the was.conf | file. This file is located in the applicationserver_root/properties directory. | 2. Add the name of the DB2 JDBC driver classes file, db2jdbcclasses.zip, to one | of the following properties: | v For Version 1.1, the ncf.jvm.classpath or servlets.reload.directories property | in the was.conf file. This file is located in the applicationserver_root/properties | directory. | v For Version 1.2, the ncf.jvm.classpath or servlets.reload.directories property | in the was.conf file. This file is located in the server_model_root/properties | directory. | v For Version 3.02, the appserver.classpath property or | theservlet.reload.directories property. The appserver.classpath property is | located in the /Appserver/properties/default_global.properties file. The | servlet.reload.directories property is contained in the was.conf file which is | located in the applicationserver_root/properties directory. | Adding the name of the DB2 JDBC driver classes file to one of these properties | enables the Application Server to locate the DB2 JDBC driver. If the DB2 JDBC | driver was installed into the default directories, the driver classes file name is | /usr/lpp/db2/db2nn0/classes/db2jdbcclasses.zip, where nn is 51 for DB2 V5, | and 61 for DB2 V6. | See the Planning, Installing and Using publication for the appropriate version | of the Application Server for information on how to determine which of these | properties you should update, and how to update them. | 3. Add usr/lpp/db2/db2nn0/ to the values specified on one of the following | properties in the was.conf file: | v ncf.jvm.libpath for Version 1.1 and 1.2 | v appserver.libpath for Version 3.02 | nn is 51 for DB2 V5, and 61 for DB2 V6. | Note: If you prefer, you can add the following values to the LIBPATH variables | in the Web server httpd.envvars configuration file: | /usr:/usr/lib:/usr/lpp/db2/db2nn0/ | 4. Update the Web server httpd.envvars configuration file with the appropriate | information for the JDBC driver you are using. (Your Web server 6 WebSphere Application Server for OS/390: Requirements for using the Application Server with DB2
  • | documentation describes how to update this file.) For all of these updates, nn is | 51 if you are using DB2 V5, and 61 if you are using DB2 V6. | For the JDBC Type—2 driver (DB2 Version 5 with PTF UQ41618 or DB2 | Version 6 with PTF UQ41672 applied): | v Add the following values to the STEPLIB variables: | STEPLIB=DSNnn0.SDSNEXIT:DSNnn0.SDSNLOAD:$STEPLIB | v Add the following environment variables to the end of the file: | LD_LIBRARY_PATH=/usr/lpp/db2/db2nn0/lib:$LD_LIBRARY_PATH | DB2SQLJPROPERTIES=/usr/lpp/db2/db2nn0/classes/db2sqljjdbc.properties | Note: Adsnaoini file is not required for a DB2 JDBC Type—2 driver. | For the JDBC Type-1 driver (PTF UQ41618 or UQ41672 has not been applied): | v Add the following values to the STEPLIB variables: | STEPLIB=DSNnn0.SDSNEXIT:DSNnn0.SDSNLOAD:$STEPLIB | v Add the following environment variables to the end of the file: | DSNAOINI=/dsnaoini_file_directory/dsnaoini: | LD_LIBRARY_PATH=/usr/lpp/db2/db2nn0/lib:$LD_LIBRARY_PATH | Note: There are no special location requirements for the | dsnaoini_file_directory. | Setting up DB2 tables Even if the Application Server is able to locate and communicate with DB2, the DB2 Administrator must set up DB2 tables to contain the data the servlets require before data can be passed between DB2 and the Application Server. The Application Server Webmaster, servlet developers and the DB2 Administrator should work together to set up the required DB2 tables. The DB2 for OS/390 V5 SQL Reference, or the DB2 UDB for OS/390 V6 SQL Reference describe the syntax of the SQL statements used to define DB2 tables. DB2 Hints and Tips Even if DB2 was previously installed on your system for use with some other function, the following information may be useful: Customizing Recoverable Resources Management Services (RRS) The Redbook e-business Application Solutions on OS/390 using Java contains an example of how to customize RRS for your OS/390 system. Customizing SQLJ/JDBC run-time properties files If you are using the DB2 JDBC Type-2 (PTF UQ41618 or UQ41672 is applied), then the DB2 JDBC driver’s default settings for the DB2 attach type and OS/390 multiple context support are correct for Application Server use. However, you may want to refer to the DB2 Application Programming Guide and Reference for Java for additional information about the other JDBC driver properties that can be set in this file. Setting up a CLI initialization file for DB2 Version 5 for OS/390 If you are using DB2 V5 and the DB2 JDBC Type-1 driver (PTF UQ41618 is not applied), you must set up a CLI initialization file, and make sure that the setting Chapter 2. Using the Application Server with DB2 for OS/390 or DB2 UDB for OS/390 7
  • on the MVSATTACHTYPE keyword is changed to RRSAF to indicate that the RRS Attach Facility is to be used to connect to the DB2 for OS/390 address space. The CLI initialization file that was used during the testing of the Application Server Version 1.2 with DB2 Version 5 follows. For more information on CLI file keywords and settings, refer to DB2 for OS/390 Version 5 Call Level Interface Guide and Reference. CLI initialization file example: ;This is a comment line... ;Example COMMON stanza for DB2 MVS049 [COMMON] MVSDEFAULTSSID=DSN5 MULTICONTEXT=1 ;Example SUBSYSTEM stanza for DSN5 subsystem [DSN5] MVSATTACHTYPE=RRSAF PLANNAME=DSNACLI ;Example DATA SOURCE stanza for DB2M049 dta source [DB2M049] AUTOCOMMIT=0 CONNECTTYPE=1 When creating the CLI initialization file, ensure that: Notes: 1. The square brackets in the initialization file consist of the correct EBCDIC characters. The left square bracket must use the hexadecimal characters X’AD’. The right square bracket must use the hexadecimal characters X’BD’. CLI does not recognize brackets if they are not coded this way. 2. All sequence numbers are removed from the file. CLI cannot use an initialization file containing sequence numbers. Setting up an ODBC file for DB2 UDB for OS/390 Version 6 When setting up an ODBC file, make sure that: v The setting on the MVSATTACHTYPE keyword is changed to RRSAF to indicate that the RRS Attach Facility is to be used to connect to the DB2 for OS/390 address space; the default setting is CAF, which indicates that the Call Attach Facility is to be used. v If you intend to use the Application Server Connection Manager to handle data connections between DB2 and the Application Server, the setting on the MULTICONTEXT keyword is changed to 1 to allow for the creation of an independent context for a data source connection. For more information on ODBC file keywords and settings, refer to DB2 UDB for OS/390 Version 6 ODBC Guide and Reference. 8 WebSphere Application Server for OS/390: Requirements for using the Application Server with DB2
  • Index A Application Server communicating with DB2 6 Application Server properties ncf.jvm .classpath property 6 C Call Level Interface (CLI) 7 D DB2 identifying to the Application Server 6 using to store session tracking information 6 DB2 Call Level Interface (CLI) 7 documentation Call Level Interface (CLI) 7 Redbooks 7 Resource Manager Services (RRS) 7 H hints and tips 7 P properties ncf.jvm .classpath property 6 R Recoverable Resources Management Services (RRS) 7 S SQLJ/JDBC run-time properties files, customizing 7 W was.conf file, properties contained in ncf.jvm .classpath property 6 WebSphere Application Server communicating with DB2 6 9
  • 10 WebSphere Application Server for OS/390: Requirements for using the Application Server with DB2
  • Program Number: Printed in the United States of America on recycled paper containing 10% recovered post-consumer fiber.