Skip Headers
Oracle® Access Manager for AS/400 Installation and User's Guide
10g Release 2 (10.2) for IBM iSeries OS/400

Part Number B16223-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

5 Oracle Net

In the client-server model, a client application accesses a database server 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 achieved 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. It includes the following sections:

5.1 Oracle Net File Name Structure

Oracle Database Net Services Administrator's Guide and Oracle Database Net Services Reference refer to configuration, trace, and log files:

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 file name 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.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

Native IBM Networking

When an Oracle SQL application communicates with a remote Oracle server, it uses an Oracle Net connection that is defined in the tnsnames.ora file.

Figure 5-2 Native Oracle Networking

Native Oracle Networking

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

Figure 5-3 Oracle Access Manager Networking

Oracle Access Manager Networking

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

Defining the Oracle Server to Access Manager
Description of "Figure 5-4 Defining the Oracle Server to Access Manager "

5.3.1 Remote Database Directory Entry

The AS/400 ADDRDBDIRE command is used to define remote database directory entries. The name you use on the ADDRDBDIRE command must be identical with the name of a description entry in your ORA(TNSNAMES) file. And that name is the same as the name used as a connection identifier in your CONNECT command either in your program or in STRSQL.

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 name used in the RDB parameter when using the ADDRDBDIRE command. That is, the name must match the name of the RDB entry in the AS/400 RDB directory which is maintained by the ADDRDBDIRE command.

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 the 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 titled Relational database. Enter *ARDPGM on the line titled "Name or address". Do not change the data on the line titled 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.

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 "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 name of the AS/400 RDB directory entry that was defined in the previous step using the ADDRDBDIRE command.

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 a connection to 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. Use option 10 of the CFGTCP command to edit the host table entries for your system. 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)
                   )
               )