| Oracle Transparent Gateway for DB2/400 Installation and User's Guide Release 9.2.0.1.0 for IBM AS/400 Part Number A97615-01 |
|
Oracle Net is an Oracle product providing distributed database and processing capabilities. Generally, Oracle Net for OS/400 supports network communications between Oracle applications, Oracle servers, and Oracle gateways across different OS/400 systems or foreign operating systems. For product-specific information, refer to the Oracle9i Net Services Administrator's Guide and the Oracle9i Net Services Reference Guide.
This chapter presents information about the Oracle Net architecture and how to configure and use Oracle Net for AS/400. It contains the following sections:
Oracle Net is a required Oracle product supporting network communications between Oracle applications, Oracle servers, and Oracle gateways across different CPUs or operating systems. It also supports communication across different Oracle databases and CPUs providing distributed database and distributed processing capabilities.
Oracle Net also allows applications to connect to multiple Oracle servers or gateways across a network, selecting from a variety of communications protocols and application program interfaces (APIs) to establish a distributed processing and distributed database environment.
A communications protocol is a set of implemented standards or rules governing data transmission across a network. An API is a set of subroutines providing a programming interface for application processes to the network environment.
Dividing processing between a front-end machine running an application and a back-end machine used by the application is known as distributed processing. Oracle Net enables an Oracle tool or application to connect to a remote machine containing an Oracle server or Oracle gateway.
Several databases linked through a network and appearing as a single logical database are known as a distributed database. An Oracle tool running on a client machine or on an Oracle server running on a host machine can share and obtain information retrieved from other remote Oracle servers or Oracle gateways. Regardless of the number of database information sources, you might only be aware of one logical database.
The following terms are used to explain the architecture of Oracle Net for OS/400:
host
is the machine the database resides on and that runs the Oracle gateway. On OS/400, only a gateway can be running, the Oracle database does not run on the AS/400.
client (task)
is the application using a Oracle Net driver to communicate with the Oracle server or gateway. A server is also considered to be a client if it initiates a connection with another Oracle server, or with an Oracle gateway.
protocol
driver
network
Oracle Net connections are established on the AS/400 through a listener. A listener receives incoming connections from Oracle Net clients and starts or transfers to a job on the AS/400 system.
On the AS/400, the Oracle Net TNS listener is used for TCP/IP.
Figure 5-1 shows communication between a client and the AS/400. Oracle Net on the AS/400 can accept TCP/IP connections.
After the listener accepts the client connection, a batch job is started on the AS/400. The batch job executes the gateway and sends a response back to the client. The response is data or a message. Each batch job is responsible for a given client connection. One batch job is executed for a single connection, and a single connection is associated with only one batch job.
To reduce the waiting time for connecting to gateway jobs, a set of prestarted gateway batch jobs are associated with a TNS listener. The number of prestarted jobs and the point at which additional jobs are started can be modified by the system administrator.
Oracle Net refers to files in the following format:
basename.extension
where basename is the base portion of the name, and extension is the second part of the name.
An example of this form is SQLNET.ORA.
On the AS/400, the Oracle Net parameter files are installed in the gateway instance library using the following file name mapping:
For example, the SQLNET.ORA parameter file is mapped to member SQLNET in the ORA file that is located in the gateway instance library. Member names are referred to as:
file(member_name)
Some of the parameter values in ORA(SQLNET) can be changed with the CHGORANET command. For more information, refer to "CHGORANET, Change Network Parameters".
For a list of the network files and members that are provided with the gateway, refer to Appendix A, "Oracle Net Files and Members".
To enable tracing for the listener or server, use the CHGORANET command to change the values of the Listener trace level and Server trace level parameters. Possible trace level values are:
Because trace files are large, you should use the least detailed trace level possible. For more information about changing the trace level parameters, refer to "CHGORANET, Change Network Parameters".
When tracing is enabled, each job produces a trace file member in the TRC file with a member name in the format:
SERVxxxxxx (for server jobs)
or
LISTxxxxxx (for listener jobs)
where xxxxxx is the job number.
This step is required only if no physical connection currently exists between the Oracle9i database server and the AS/400.
To define the physical connection, use any of the following AS/400 commands:
When you use one of these AS/400 commands, you can set the AUTOCREATE CONTROLLER parameter to *YES (the AS/400 system default is *NO). This enables the AS/400 auto-configuration feature.
If a line is already defined, then you can use the DSPLIND line_name command to display the line description parameters.
These line description parameters are used to configure the network on the machine where the gateway resides. For example, when using a token ring system, you must know the AS/400 token ring address.
When you install the gateway, you are prompted for a listener port, through which TCP/IP connections will be established. A listener job automatically starts when the gateway subsystem starts. The listener monitors the TCP/IP port you specified and accepts incoming connections directed to that port. After a connection is made, the listener starts a server job using the Oracle Net bequeath mechanism.
Internal process communication (IPC) between the listener and the server job is achieved through AS/400 local APPC devices. The listener then redirects the client connection to a randomly generated port assigned to the server job. This process is the Oracle Net inherit mechanism.
For more information about Oracle Net, refer to the Oracle9i Net Services Administrator's Guide and the Oracle9i Net Services Reference Guide.
Figure 5-2 demonstrates a TCP/IP connection flow.
Perform the following steps to configure your TCP/IP connection between the Oracle9i database server and your AS/400:
Many sites specify 1521 as the port number when the gateway is installed. If your gateway is already assigned to port 1521 or to another available port number, go to Step 2.
If your gateway is not assigned to a working port number, you must assign the gateway to a port it can use. Determine the number of an available port and assign it with the gateway CHGORANET command. You can find the values of port numbers currently active using the AS/400 command NETSTAT *CNN. Each running instance requires a unique listener port number; two gateway instances active at the same time cannot use the same listener port number. Refer to "CHGORANET, Change Network Parameters" for more information.
To define the host name, perform these steps:
________________________________________________________________________________ Change TCP/IP Domain (CHGTCPDMN) Type Choices, press Enter. Host name... 'AS400' Domain name... 'US.ORACLE.COM' Domain search list... *DFT Host name search priority... *REMOTE *REMOTE, *LOCAL, *SAME Domain name server Internet address... '144.25.88.144' '144.25.244.29' Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F11=How to use this dispay F24=More Keys ________________________________________________________________________________
Domain name field is empty. Enter your host name if the Host name field is empty.
Press [Enter] to save your changes and return to the option list panel. (The changes take effect after you restart the gateway.)
The host name and the domain name combine to form the qualified host name. For example, AS400A combines with US.ORACLE.COM to form AS400A.US.ORACLE.COM as the qualified host name.
Verify your host name is in your host name table with the following AS/400 command:
PING host_name.domain_name
You can also use a PING command on the client-side Oracle database server to verify that it can communicate with the AS/400.
Use the Oracle Gateway Monitor to verify that the listener is started. If it is necessary to start the listener, use the Oracle Gateway Monitor to do so, or start the listener manually with this command:
STRORALSN
You can use the NETSTAT *CNN command to verify that the port that is assigned to the LISTENER is, in fact, being used by the LISTENER job in a given gateway instance. For more information on using the Oracle Gateway Monitor, refer to Chapter 8, "Administering the Gateway".
Perform the following steps to configure your Oracle server machines for TCP/IP. Refer to the networking documentation for your Oracle server machine for more information about configuring it.
Use the TCP/IP connect descriptor in the TNSNAMES.ORA file on the Oracle9i database server:
connect_name = (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP) (PORT=1521) (HOST=host_name) ) (CONNECT_DATA=(SID=csi_name)) (HS=) )
where:
connect_name
is the name of the connection. This name must be unique within the TNSNAMES.ORA file. The connect_name corresponds to the value that is found with the USING keyword on a CREATE DATABASE LINK command.
TCP
1521
is the default port number that is used by the Oracle Net listener on the AS/400. Change this value if you have changed the listener port number.
host_name
csi_name
is the name of the communication side information (*CSI) file that is used by the listener to start the server. Usually, the csi_name is ORAGATE. Refer to "Step 2: Specify SID Names" for more SID names.
HS=
Oracle servers that are using TCP/IP to connect to a gateway must specify a system identifier (SID) name in the TNSNAMES.ORA file that is used to connect to the AS/400. The SID name is used on the AS/400 to start the server. The listener uses the SID name to reference a *CSI file. The *CSI file uses a TP_NAME to start the required CL program in the gateway server. Several different SID names are configured in the shipped system and are listed in the following table.
Set the SID to ORAGATE to use a prestarted job. ORAGATE would give the best response time. Setting the SID to the other values should be done in special situations as directed by Oracle Corporation support personnel
| SID | *CSI | TP_NAME | CL Program |
|---|---|---|---|
|
ORAGATE |
ORAGATE |
ORAGWTPJ |
RUNORAGTTP |
|
ORAGTPJ |
ORAGTPJ |
ORAGWTPJ |
RUNORAGTTP |
|
ORAGTEJ |
ORAGTEJ |
ORAGWTEJ |
RUNORAGTTE |
|
ORAGTTC |
ORAGTTC |
ORAGWTTC |
RUNORAGTTT |
The following table provides the name and usage of each SID:
Refer to "Viewing Jobs" for instructions on viewing jobs and a description of the jobs that typically exist.
If you cannot access AS/400 data using Oracle Net after configuring TCP/IP, check to see whether the AS/400 is reachable by pinging the AS/400 from an Oracle server host from the operating system prompt, or use a similar command from the shell prompt:
PING host_name.domain_name
where host_name is the name identifying your AS/400.
If you cannot resolve your connection problem, refer to "Contacting Oracle Support Services" for more information.
The following suggestions may resolve your connection problems:
Review your Oracle Net configuration.
Verify that the definition for the host name (from Step 2 of Configuring for TCP/IP) contains the fully qualified name. Without a fully qualified host_name.domain_name, Oracle Net cannot resolve the address, and you will be unable to access AS/400 data.
You may experience the following error types: ORA-28509, ORA-28511, ORA-28500, ORA-12154, or a hanging condition.
HS= is a new parameter that you must specify in the tnsnames.ora file, or you will not be able to use version 9 of the gateway. The correct syntax is shown at "Connecting to the AS/400 through TCP/IP". If HS= is missing from your tnsnames.ora file, some symptoms are hanging connection and errors ORA-2068 and ORA-3114. Search Metalink for Note 136294.1, which provides more details about this topic.
HS= is specified in tnsnames.ora, but it is not specified in the correct place, or the number of parentheses is uneven (an odd number due to missing or extra parentheses).
HS= needs to be set up outside the CONNECT_DATA specification. If you misplace HS=, or if you do not have the correct parenthesis specification, then you can get error ORA-28509.
Other symptoms (same as when HS= is missing from your tnsnames.ora file) are hanging connection and errors ORA-2068 and ORA-3114.
TCP/IP configuration under AS/400 (10"Option 10 of CFGTCP: Work with TCP/IP Host Table Entries") is not configured as anticipated by the gateway listener.
The gateway listener requires host_name.domain_name in the TCP/IP host table entries. If you do not specify this, then you will not be able to get any response back from the gateway. You will be able to see the connection in the AS/400, but no data can be transferred.
The gateway listener is automatically started when you start the gateway instance. You can manually start the listener by executing the command: STRORALSN.
Check to see that the gateway is up and running correctly and is properly configured. Check to see if listener is up.
host.domain Name
Ensure that a fully qualified host.domain name has been set on the AS/400. Use CFTTCP to do this. Use Option 10 and Option 12 to set a fully qualified host.domain name. Use ping to verify that the host.domain name matches the IP address of the host name.
Check any accompanying message from the AS/400 to determine what the problem might be, or check the AS/400 job log (RUNORAGTTP job log). For example, message SQL-7008 indicates that the file is not journalled.
This error indicates that a missing or incorrect tnsnames file has been specified, or that an incorrect spelling or service name has been specified in the tnsnames file. This is generally an Oracle Net issue, not a gateway issue.
You may encounter errors during the test phase of your gateway installation even though you are able to issue a TNSPING. If you do encounter such errors, please check the panels that were used to define the host name. Specifically, check the values presented when using option 12 of the CFGTCP command.
| Option | Internet Address | Host Name |
|---|---|---|
|
|
10.10.5.40 |
AS400.US.ORACLE.COM |
|
|
127.0.0.1 |
LOCALHOST |
Enter Internet addresses and host names. Host names in the "Work with TCP/IP Host Table Entries" panel must include both the unqualified and the qualified names (the one that includes the domain name).
Option 10 depends upon Option 12. Option 12 defines your host name as well as your domain name, Under Option 10, you must enter your host name and your hostname.domain_name. This may seem redundant, but if the gateway is not configured correctly for TCP/IP, then the gateway will not make a connection, regardless of the output from the TNSPING command. Any changes to CFGTCP will require you to restart the gateway.
TCP configuration is documented in "Configuring Oracle Net for TCP/IP AS/400" in this chapter.
| Option | Host name | Domain name |
|---|---|---|
|
|
|
' |
The host name and the domain name combine to form the qualified host name. For example, AS/400A as illustrated in Option 12 combines with US.ORACLE.COM to form the qualified host name AS400A.US.ORACLE.COM as the qualified host name.
|
|
![]() Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|