|
Oracle9i Enterprise Edition User's Guide
Release 2 (9.2.0.1.0) for OS/390 Part No. A97312-01 |
|
The Oracle9i database server is implemented as a database service under OSDI. It can monitor events relevant to its operation, such as TSO logoff, abnormal terminations, and operator console commands.
This chapter describes basic information on installation, utilities, and utilities needed for using the Oracle9i for OS/390 server and contains the following sections:
The Oracle database instance on OS/390 is implemented as a service under a given Oracle subsystem. This chapter discusses considerations for connecting local (TSO, batch, CICS, IMS) Oracle utilities or applications to database instances running on the OS/390 system. Connecting from UNIX System Services is discussed in Chapter 4, " Accessing Oracle9i Under USS".
Oracle9i database server users on OS/390 communicate with the local Oracle database instance using OS/390 cross memory services. This facility allows both data and program operation to cross address space boundaries in a secure and controlled manner.
Each TSO or batch user of an Oracle9i for OS/390 instance runs as a separate and autonomous address space. You can only access an Oracle instance after a valid connection is established between the user address space and the Oracle instance. A valid connection occurs when the Oracle instance accepts the logon user id and possibly a password provided by the user.
This section discusses considerations for connecting local TSO or batch Oracle utilities or applications to Oracle database instances running on the same OS/390 system. Such connections use OS/390 cross-memory facilities and do not involve the Oracle Net. However, since the Oracle database server logically views all client connections as network connections, Oracle network terminology and some of the mechanisms of Oracle Net play a role in local connections.
Oracle database server clients use a cross-memory protocol for connecting to database instances. The protocol is based on Oracle Net architecture.
Since Oracle's cross-memory protocol is based on Oracle Net, the formal mechanism for specifying a local target Oracle instance is to supply a name that is looked up in the client's tnsnames file (which is identified by the TNSNAMES DD statement). Applications supply the name by appending an "@" character followed by the name to the userid and password that are passed during an Oracle connect request. The entry in the tnsnames file contains an Oracle Net address string with PROTOCOL=XM and additional parameters identifying the target database service. The complete format of the PROTOCOL=XM Oracle Net address is described under "Cross-Memory Protocol Address". Usually the target service is identified by its SID. Every service must have a SID that is unique throughout the OS/390 image. Even services that are defined in different Oracle subsystems cannot have the same SID if they are on the same OS/390 image.
It also is possible to append the complete Oracle Net address string directly to the userid and password to avoid using the tnsnames file. Oracle does not recommend this technique, however.
The formal Oracle Net address string for Oracle's cross-memory protocol can be specified using either of two methods:
One method identifies the database instance by its SID:
(ADDRESS=(PROTOCOL=XM)(SID=sid))
where sid is the SID associated with the database instance.
The other method uses the Oracle subystem and service names:
(ADDRESS=(PROTOCOL=XM)(SUBSYS=ssn)(SERVICE=srvn))
where ssn is the Oracle subsystem name, and srvn is the database service name.
Oracle recommends using the SID form of address because it is simpler and because it avoids application dependence on the subsystem name.
There are four ways, including hardcoding an Oracle Net address on the connect string as described in the previous section, to specify a target instance. In descending order of precedence, the four ways are:
Specifying a tnsname entry which refers to the Oracle Net cross-memory protocol on the connect string.
Providing a DD statement (or equivalent TSO allocation) of the form:
//ORA@sid DD DUMMY
where sid matches the SID of the target service. Normally this is used only in batch or TSO applications.
A TWO_TASK environment variable that is set to an Oracle Net tnsnames-style name or to an explicit Oracle Net address string. If a name is specified, then the TNSNAMES DD in the client address space is opened and read to resolve the name to an Oracle Net address. If the Oracle Net address specifies PROTOCOL=XM, then the client is connected to the indicated OSDI service. (The Oracle Net address could also specify PROTOCOL=TCP, in which case the client would connect to a remote Oracle instance via Oracle Net as discussed in "Oracle Net Connect Descriptors for OS/390" in Chapter 10.) In terms of precedence, clients look for TWO_TASK after determining that no ORA@sid DD is allocated in the address space.
An ORACLE_SID environment variable is set to the SID of a database instance; the client is connected to that instance. Clients look for ORACLE_SID last, after determining that no TWO_TASK environment variable is set.
Installation-specific information is required to use the Oracle9i database server effectively. This information is available from your Oracle DBA.
The installation process creates several load and source module libraries you might need to access. For example, you might need information about the following:
All utilities, programs, and dynamically loaded modules for Oracle utilities are located in the CMDLOAD library. The person who installs the Oracle9i database server at your site determines this data set name.
The examples presented in this guide assume the CMDLOAD library has the data set name oran.orav.CMDLOAD.
MESG library name
This library contains NLS data objects and all Oracle message modules.
The SQLLIB library contains modules used in linking programs developed in high-level languages and IBM Assembler. It contains modules used by both Oracle Precompiler applications and OCI applications.
The SRCLIB library contains sample JCL, program code, and scripts for Oracle tools, Programmatic Interfaces and Access Manager.
The OBJLIB library contains the object module ()RASTBS) for liking Oracle call Interface programs that do not use the LONGNAME compiler option.
Refer to the Oracle9i Enterprise Edition Installation Guide for OS/390 for more information on load and source module libraries.
Contact your Oracle DBA for the following information you need to use the Oracle utilities:
Name and location of the Oracle cataloged procedures
The following factors influence the syntax used to run the Oracle utilities:
You can invoke the Oracle utilities from TSO or you can use JCL procedures to submit a batch job.
How you invoke Oracle utilities from TSO at your site might differ slightly from what is described in this guide because access standards and requirements differ among installations. Your DBA can provide you with the command syntax standards specific to your installation.
Call the Oracle utilities from TSO using one of the following:
Running as a command processor
Using the TSO CALL command
You control tool operation with CLISTs and the Interactive System Productivity Facility (ISPF) regardless of which technique you use. The technique used is largely determined by decisions made at your site during installation. The technique can also be affected by the number of active Oracle instances and the release levels of the instances. Contact your DBA if you have any questions about which technique to use.
|
Note: You must allocate the MESG data set as ORA$LIB DD before invoking any utilities:
|
When the Oracle CMDLOAD library is concatenated to your STEPLIB or when its contents are placed in a linklist library, the Oracle utilities are accessible as command processors according to standard TSO conventions. The standard syntax is:
command [parm1][parm2]...[parmn][userid[/password[@tnsname]]] [options]
All the Oracle utilities are accessible through the TSO CALL command. Use the CALL command to specify operation of a program from a specific library. In the CALL command, specify the module to be run and any needed parameters. The CALL command syntax is:
CALL 'oran.orav.CMDLOAD(command)' '[parm1] [parm2]...[parmn] [userid[/password[@tnsname]]] [options]'
Provide the CMDLOAD library name, the invocation command, one or more positional parameters followed by the user id and password, an optional connect string, and one or more options. The number of positional parameters and the options available are tool-specific. The single quotes are part of the command syntax and must be included as shown in the example.
The CALL command and other TSO commands can be continued from one line to the next using the normal TSO continuation syntax (a dash, , to indicate continuation to the next line) and without regard for line formatting.
You may also access Oracle utilities using CLISTs. The CLIST can access the utilities as command processors or as called programs. The developer of a CLIST can perform preliminary allocations of files, check for error conditions, and generally ensure that access to the Oracle server proceeds according to installation standards.
If you have any questions about the approved method of calling any Oracle tool at your site, then contact your DBA.
The Oracle installation process optionally creates batch JCL procedures you can use to call the Oracle utilities. The procedures at your installation might have different names than those in the following list if a procedure name suffix is selected during the installation. Check with your system administrator before attempting to use the following procedures.
Table 2-1 Batch JCL Procedures for OS/390
The following example shows the ORASQL JCL procedure, which runs SQL*Plus:
//ORASQL PROC INDEX=oran, // LIBV=orav, // SYSOUT='SYSOUT=*' //ORASQL EXEC PGM=SQLPLUS,REGION=4M //STEPLIB DD DSN=&INDEX..&LIBV..CMDLOAD,DISP=SHR //ORA$LIB DD DSN=&INDEX..&LIBV..MESG,DISP=SHR //SYSOUT DD &SYSOUT,DCB=(LRECL=132,BLKSIZE=1320,RECFM=VB) //SYSERR DD SYSOUT=*,DCB=(LRECL=132,BLKSIZE=1320,RECFM=VB) //ORAPRINT DD SYSOUT=* //* REQUIRES //SYSIN DD* STATEMENT //* REQUIRES //ORA@sid DD DUMMY STATEMENT (ORACLE INSTANCE NAME)
The INDEX and LIBV symbolic parameters are used to form the STEPLIB and ORA$LIB data set names. The actual values for these parameters are established by the person who installed the Oracle9i database server. The cataloged procedures ensure the default values of these symbolic parameters conform to the actual names selected for the Oracle data sets at your installation.
In the example, the installed Oracle INDEX and LIBV parameters are oran and orav, respectively. These values result in the following data set name for the STEPLIB DD statement:
oran.orav.CMDLOAD
The SYSOUT DD statement contains a symbolic reference to &SYSOUT. This symbolic reference defaults to the string SYSOUT=*, which sets the SYSOUT class of this DD statement to the same class as MSGCLASS in the JCL JOB statement.
The procedure requires additional JCL to point to the correct Oracle instance. See earlier section 'Specifying Connections' for details. Some examples are:
Example 2-1 Example #1
//ORA@ORA1 DD DUMMY
Example 2-2 Example #2
//ORA$ENV DD *
TWO_TASK=ORANAME
//TNSNAMES DD *
ORANAME=(DESCRIPTION=
(ADDRESS=(PROTOCOL=XM)(SID=ORA1))
)
Example 2-3 Example #3
//ORA$ENV DD * ORACLE_SID=ORA1
All three of the above examples illustrate accessing a local instance whose SID is ORA1.
Alternatively, the connection can also be specified using a tnsname alias on a userid and password supplied in the SYSIN file, or in the PARM field of the EXEC statement.
This procedure requires a SYSIN DD statement. The SYSIN DD statement can contain instream SQL and SQL*Plus statements, or it can point to a file containing such statements.
Each JCL procedure provided with the Oracle9i database server conforms to the basic structure illustrated by the ORASQL procedure.
The following example JCL runs the ORASQL cataloged procedure. You must provide an appropriate JOB card at the beginning of the sample job. The example assumes the Oracle instance you are connecting to has ORA1 as its SID.
// ... JOB ... //SQL EXEC ORASQL, // PARM='SCOTT/TIGER' //ORA@ORA1 DD DUMMY //SYSIN DD DSN=SCOTT.ORACLE.SQL(SQLSTUFF),DISP=SHR
User id SCOTT is used to connect to the Oracle instance.
The contents of member SQLSTUFF in data set SCOTT.ORACLE.SQL is run. This file must contain valid SQL and SQL*Plus statements.
Ask your DBA or systems programming staff for the location of these JCL procedures and the correct symbolic parameters that must be provided to the utilities. These procedures are installed in a library that is automatically searched by the JES2 or JES3 job entry subsystem. If you experience problems in running these procedures, then contact your Oracle DBA.
In response to an input prompt, a forward slash followed by an asterisk (/*) is used to exit any line mode Oracle9i for OS/390 tool or utility.
For TSO applications, the Oracle subsystem establishes an attention processing subtask through the OS/390 STAX macro instruction. When the [Attn] or [PA1] key is pressed, the interrupted status is passed to the connected Oracle address space. The corresponding main task then performs the interrupt processing and returns to the application address space. The attention processing is removed when the disconnect function is called and the attention processing subtask is detached.
For both Oracle tools and customer-written applications running in TSO/E, the Oracle program interface code will attempt to establish an attention-processing subtask that uses the TSO/E STAX service.
This mechanism allows the user to interrupt an operation in the Oracle server by pressing the terminal [Attn] or [PA1] key. For this to work, the ORASTAX module must be loadable from JOBLIB/STEPLIB, a linklist library, or LPA. If ORASTAX cannot be loaded, attention processing is suppressed; no messages are issued to indicate this condition.
In addition to the above, certain Oracle tools or utilities recognize and process TSO/E attention if it occurs while the utility is active (that is; not during a server request). These are discussed in the relevant tool or utility sections.
Attention interrupt processing is specific to each tool. Chapter 9, " SQL*Plus" discusses the effect of attention processing.
Environment variables enable you to set certain options for each user. Specify environment variables in a sequential file or in a PDS member pointed to by the ORA$ENV DD statement.
Environment variables have the following syntax:
user_env_name = 'env_value' *** comment ****
where:
user_env_name
|
is the environment variable name. This name can be expressed in uppercase, lowercase, or mixed case. |
env_value
|
is the environment variable value you specify. If the value is enclosed by single quotes, then it is saved exactly as you specify it. If the value is not enclosed in single quotes, then the value is translated to uppercase and saved in uppercase. |
comments
|
is an optional comment. If comment is used, then 'env_value' must be enclosed by quotes. If the first nonblank character is '*', '/', or '#', then the whole line is treated as a line comment.
|
The following environment variables are supported:
Oracle NLS parameters as described in the Oracle9i Database Globalization Support Guide
Oracle connection environment variables, ORACLE_SID and TWO_TASK
OS/390-specific environment variables
ORACLE_SID, TWO_TASK, and the OS/390 environment variables are described in the following list.
|
![]() Copyright © 2002 Oracle Corporation All rights reserved |
|