Skip Headers

Oracle® Access Manager for AS/400 Installation and User's Guide
10g Release 1 (10.1) for IBM iSeries OS/400
Part No. B13951-01
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

5 Oracle Net

In the client/server model, a client application accesses a database server in order to satisfy database operations that are initiated by an application. The Oracle Access Manager for AS/400 is based upon the client/server model. All application processing, such as the user interface and data presentation, occurs at the client workstation on an AS/400. All Oracle Database processing occurs at the Oracle server, which (when using Oracle Access Manager for AS/400) is not on an AS/400 computer.

Interaction between the client and server is executed through a common dialogue or messaging system that is designed for the SQL language. With Oracle Net, databases and their applications can reside on different computers and communicate as peer applications in a Transparent Networking Substrate (TNS) network.

Read this chapter to learn how to configure and use Oracle Net with Oracle Access Manager for AS/400. Topics include:

5.1 Oracle Net File Name Structure

Oracle Net Services Administrator's Guide and Oracle Net Services Reference Guide refer to files in the following form:

basename.extension 

where:

basename is the base portion of the name

extension is the extension portion of the name.

An example of this form is tnsnames.ora.

On the AS/400, the Oracle Net parameter files are installed in the Access Manager library by using the following filename mapping:

For example, the tnsnames.ora parameter file is mapped to member TNSNAMES in the ORA file that is located in the Access Manager library.

Member names are referred to as:

file(member_name)

5.1.1 Oracle Net Tracing Members

When Oracle Net tracing is enabled with the CHGSQLNET command, members with names similar to CLNTnnnnnn are created in the TRC file in the Access Manager library. These members contain Oracle Net trace records that are to be used by Oracle Support Services for diagnosing communications problems. The nnnnnn portion of the name corresponds to the OS/400 job number.

For more information on Access Manager commands, refer to Chapter 6, "Configuring Access Manager".

5.2 Connecting to Oracle through Oracle Net

When an AS/400 application communicates with a remote IBM database server, it uses the IBM DRDA connection that is defined through the AS/400 ADDRDBDIRE command. RDBDIRE means Remote DataBase DIRectory Entry.

Figure 5-1 Native IBM Networking

Description of net_1.gif follows
Description of the illustration net_1.gif

When an Oracle SQL application communicates with a remote Oracle server, it uses an Oracle Net connection that is defined in the ORA(TNSNAMES) file.

Figure 5-2 Native Oracle Networking

Description of net_2.gif follows
Description of the illustration net_2.gif

Connecting through Access Manager involves combining the IBM DRDA connection with the Oracle Net connection.

Figure 5-3 Oracle Access Manager Networking

Description of net_3.gif follows
Description of the illustration net_3.gif

In Figure 5-3, the remote database name is used as the key for both the RDBDIRE lookup and the TNSNAMES lookup.

5.3 Defining the Oracle Server to Oracle Access Manager

To connect to an Oracle server through Oracle Net, you must define an Oracle Net TNSNAMES entry with a name that matches your AS/400 RDBDIRE entry. This section provides a general description of these definitions. To create these definitions, refer to "Oracle Net for TCP/IP AS/400 Configuration" for specific instructions. Figure 5-4 shows how these matching entries interact:

Figure 5-4 Defining the Oracle Server to Access Manager

Description of net_4.gif follows
Description of the illustration net_4.gif

5.3.1 Remote Database Directory Entry

Using the AS/400 ADDRDBDIRE command, you must define a remote database directory entry on your AS/400 for each Oracle Net TNSNAMES entry. The relational database name must have a matching entry in the ORA(TNSNAMES) file.

5.3.2 ORA(TNSNAMES)

To connect to the target Oracle server through Oracle Net, you must add an entry to the ORA(TNSNAMES) file in the Access Manager installation library. The entry name must match the RDB directory entry relational database name.

5.3.3 Configuration Entries

The following examples show the relationship between the AS/400 TCP/IP configuration and Access Manager. The "ORA2" entries (in bold font) are the matching entry names.

  • ORA(TNSNAMES)

    ORA2 = (DESCRIPTION=
                     (ADDRESS=
                       (PROTOCOL=TCP)
                       (PORT=1521)
                       (HOST=UNIX9)
                     )
                     (CONNECT_DATA=(SERVICE_NAME=Oracle92)
                     )
                   )
    
    
  • AS/400 Relational Database Directory Entry (DSPRDBDIRE)

    Relational database . . . . . . . :  ORA2
    Remote location:
      Remote location . . . . . . . . :  *ARDPGM
    Application requester driver:
      Program . . . . . . . . . . . . :  ORAARD
        Library . . . . . . . . . . . :  ORAAM400
      Interface level . . . . . . . . :  1
    Text. . . . . . . . . . . . . . . :
    

The TNSNAMES entry may be in any case, but it will be mapped to uppercase by Access Manager.

5.4 Oracle Net for TCP/IP AS/400 Configuration

Perform the following steps to configure the client connection between the AS/400 and the Oracle server. These configuration steps are presented here with the assumption that TCP/IP is already installed and configured on your AS/400 with basic connectivity (ping, for example) established between the AS/400 and the server that is hosting the Oracle Database server.

5.4.2 Step 1: Create Relational Database Directory Entry

Using the AS/400 ADDRDBDIRE command, define a relational database directory entry (Panel 1, Example 5-1). Enter the name of the entry on the line entitled "Relational database". Enter *ARDPGM on the line entitled "Name or address". Do not change the data on the line entitled "Type". You may change the "Text" parameter to whatever you choose. Press [Enter]. The screen will change to add a section entitled "Application Requester Driver" (Panel 2, Example 5-2).

Example 5-1 ADDRDBDIRE Panel 1

_______________________________________________________________________________________
                        Add RDB Directory Entry (ADDRDBDIRE)

 Type Choices, press Enter.

 Relational database ........... ORACLETCP___________________
 Remote location:
   Name or address ............. *ARDPGM_____________________________________________
 ____________________________________________________________________________________
 ____________________________________________________________________________________
 __________________________________
   Type ........................   *SNA          *SNA, *IP
 Text ..........................   'TCP/IP connection to oracle'_____________________
 ______



                                                                               Bottom
 F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this desplay
 F24=More keys
_______________________________________________________________________________________

In Panel 2 (Example 5-2), enter ORAARD on the line entitled "Program", and enter the name of the install library for the Access Manager on the line entitled "Library".

Example 5-2 ADDRDBDIRE Panel 2

_______________________________________________________________________________________
                        Add RDB Directory Entry (ADDRDBDIRE)

 Type Choices, press Enter.

 Relational database ........... > ORACLETCP__________________
 Remote location:
   Name or address ............. > *ARDPGM___________________________________________
 ____________________________________________________________________________________
 __________________________________________________

   Type ........................   ____          *SNA, *IP
 Text .......................... > 'TCP/IP connection to oracle'_____________________
 ______

 Application requester driver:
   Program .....................   ORAARD____    Name, *DRDA
     Library ...................     ORAAM400__  Name, *LIBL, *CURLIB


                                                                               Bottom
 F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this desplay
 F24=More keys
_______________________________________________________________________________________

The following parameters must be entered:

Relational database is the name that you are assigning to the Oracle server relative to the AS/400. This must match the entry name of the ORA(TNSNAMES) entry.

Remote location must be *ARDPGM for the ARD interface.

Program must be ORAARD, the name of the Access Manager executable program.

Library must be the name of the Access Manager installation library.

You can also change the text parameter to whatever you choose, where text is a form of string text. Oracle Corporation recommends that you do not change any other parameters on the ADDRDBDIRE screen.

5.4.3 Step 2: Define TNSNAMES Entry

Edit member TNSNAMES in the ORA file in the Access Manager installation library using the following command:

WRKMBRPDM library_name/ORA

where library_name is the name of your Access Manager installation library. Enter a "2" on the line for TNSNAMES to edit the TNSNAMES member. If you do not have the Program Development Manager, then you can use the EDTF command to edit the member.

The TNSNAMES entry name must match the AS/400 RDB directory entry that will be defined in Step 3.

server_name = (DESCRIPTION=
                   (ADDRESS=
                        (PROTOCOL=TCP)
                        (PORT=port_number)
                        (HOST=host_name)
                   )
                   (CONNECT_DATA=(SERVICE_NAME=service_name)
                   )
               )

where:

server_name is the name of an Oracle server that matches an entry in the RDB directory. An entry in the RDB directory can be added using the ADDRDBDIRE command.

TCP is the TCP protocol used for TCP/IP connections.

port_number is the port number of the Oracle Net listener. This is usually port number 1521.

host_name is the name that defines the system where the target Oracle server resides. This name must be in the local host definition on the AS/400 or in a name server on your network. The host name can also be entered as an IP address, for example, 161.14.10.12.

service_name is the service name of the Oracle server.

Compare the instructions just provided with the following example:

ORA2 = (DESCRIPTION=
                   (ADDRESS=
                        (PROTOCOL=TCP)
                        (PORT=1521)
                        (HOST=UNIX9)
                   )
                   (CONNECT_DATA=(SERVICE_NAME=ORA2)
                   )
               )