Skip Headers
Oracle® Database User's Guide
10g Release 2 (10.2) for Fujitsu Siemens BS2000/OSD

Part Number E10320-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
PDF · Mobi · ePub

1 Getting Started

This chapter provides the BS2000/OSD-specific information that you must use with Oracle Database 10g release 2 (10.2) for Fujitsu Siemens BS2000/OSD.

This chapter contains the following sections:

1.1 The Oracle Database Environment-Definition File

Every Oracle Database utility and product under BS2000/OSD uses an Oracle Database environment-definition file, which is referred to as ORAENV. You must generate this file before you use the Oracle Database products as it contains a number of Oracle Database environment variables. These Oracle Database environment variables describe the operating environment for the Oracle Database and utilities. The section "Generating the Environment-Definition File" explains how to create the file.

If you do not generate the ORAENV file, then the default values are used for all environment variables. In some cases, there are no default values for environment variables, such as for ORASID. If you start an Oracle Database program or utility without first generating the ORAENV file, then you will not be able to connect to the Oracle Database.

The ORAENV file is a text file that has the format of a BS2000 command procedure. The command procedure calls itself using the /SET-FILE-LINK ORAENV, filename command. Each line contains an Oracle Database environment variable and its assigned value. When reading this file, Oracle Database ignores all lines that have a slash symbol (/) or asterisk symbol (*) in column one.

1.1.1 Generating the Environment-Definition File

You must generate an ORAENV file prior to using Oracle Database for the first time. Perform the following steps to generate an ORAENV file:

  1. Call the INSTALL.P.USER procedure by entering the following command:

    /CALL-PROCEDURE $ORAC1020.INSTALL.P.USER
    

    where $ORAC1020 is the name of Oracle Database 10g release 2 (10.2) installation user ID.

    You are prompted for the database system identifier, known as the sid.

  2. Enter the sid. If you do not know what the sid is, consult the database administrator.

1.1.2 Calling the Environment-Definition File

Call the ORAENV file supplied (sid.P.ORAENV) by entering the CALL-PROCEDURE command on the ORAENV file. For example, to call the example ORAENV file for the database DEMO, enter the following command:

/CALL-PROCEDURE DEMO.P.ORAENV

1.1.3 Specifying the Environment Variables

The following is the content of the ORAENV file available with Oracle Database:

/SET-PROC-OPT DATA-ESCAPE=*STD                                    
/DECL-PAR (SYSCMD(INI-VAL='DEMO.P.ORAENV'))
/       REMARK * SYSCMD must be name of this file
/       WRITE-TEXT '                                            '
/       WRITE-TEXT ' +----------------------------------------+ '
/       WRITE-TEXT ' I  Oracle Database 10g Release 2 (10.2)  I '
/       WRITE-TEXT ' I           environment setup            I '
/       WRITE-TEXT ' +----------------------------------------+ '
/       WRITE-TEXT '                                            '
/       SET-FILE-LINK ORAENV,&SYSCMD
/       SET-FILE-LINK ORALOAD,$ORAC1020.ORALOAD.LIB
/       SET-FILE-LINK ORAMESG,$ORAC1020.ORAMESG.LIB
/&*     MOD-SDF $ORAC1020.SYSSDF.ORACLE.USER
/&*     *** if SYSOUT protocol is desired set BGJOUT='KEEP' ***
/&*     SET-VAR BGJOUT='DEL'
/       EXIT-PROCEDURE
**  parameters for users:
*
ORAUID=/BS2/$ORAC1020
ORASID=DEMO
NLS_LANG=German_Germany.D8BS2000
* PRINTPAR=
/END-PROCEDURE

If you wish, you can change Oracle Database 10g release 2 (10.2) working environment by editing the user variables in this file. The Appendix B, "ORAENV Variables" contains a list of the variables you can specify in the ORAENV file. The values you assign to user variables are specific to your task only. The database administrator can also set other variables that affect the whole database instance. If you try to set values for the DBA-specific variables in the ORAENV file, then they are ignored.

Note:

You can create an individual ORAENV file for each database with which you work. To set the environment variables, call the ORAENV file containing the environment variables for the database you want to use.

1.2 The ORALOAD Library

The ORALOAD library ($ORAC1020.ORALOAD.LIB by default) is required for starting Oracle Database 10g release 2 (10.2) programs. Oracle Database uses this library to dynamically load executables when required. The ORALOAD library must be identified by the link name ORALOAD prior to calling Oracle Database programs. You get a BLS (BS2000 loader) error message, if the link name is missing. The ORALOAD link name is set when the ORAENV procedure is called. Another library, the ORAMESG library ($ORAC1020.ORAMESG.LIB by default) is required for Oracle messages. This library is assigned the link name ORAMESG in the ORAENV procedure.

1.3 Starting Oracle Utilities with /START-PROGRAM

Before you start Oracle Database products, you must call the environment-definition file, as described in the preceding section.

Start the Oracle Database programs and utilities by entering a START-PROGRAM command with the program name at the BS2000 command prompt (/). Specify the options and operands as the first data-input line when the data prompt (*) is displayed, as shown in the following example:

/START-PROGRAM $ORAC1020.program_name
CCM0001 enter options:
* [option_switch] [arguments] 

where:

program_name is the name of the program or utility to be started

option_switch is one or more of the program-dependent optional switches. If this is used, then the switch is preceded by a dash (-).

arguments are one or more operands of the program (or utilty), or the user ID and password combination, or both.

Example 1-1

To start SQL*Plus, enter the following command:

/START-PROGRAM $ORAC1020.SQLPLUS
* userid/password 
SQL>

As soon as the program is loaded, the CCM0001 prompt is displayed to let you enter the command line options. As shown in the preceding examples, you can enter the option_switch or arguments for the program. The prompt of the program is then displayed, which in the case of SQL*Plus, is SQL>. You can now enter one of the commands of the program. Refer to the generic documentation for the product for a description of the valid commands.

1.4 Starting Oracle Utilities in Unix Style

You can also start the utilities with the following commands:

/START-ORACLE-CMMIGR            or     /CMMIGR
/START-ORACLE-EXPORT            or     /OEXP
/START-ORACLE-EXPDP             or     /EXPDP
/START-ORACLE-IMPORT            or     /OIMP
/START-ORACLE-IMPDP             or     /IMPDP
/START-ORACLE-LISTENER-CONTROL  or     /LSNRCTL
/START-ORACLE-MKWALLET          or     /MKWALLET
/START-ORACLE-SQLLOADER         or     /SQLLDR
/START-ORACLE-SQLPLUS           or     /SQLPLUS
/START-ORACLE-TNSPING           or     /TNSPING
/START-ORACLE-RMAN              or     /RMAN

Parameters can be specified after the start command (in quotation marks, if the parameters contains equal to (=) or blanks). Before you start the utility, activate the MOD-SDF command in the oraenv file and call the oraenv file.

Example:

/sqlplus
/lsnrctl stop
/oimp 'system/manager file=iea buffer=210000 ignore=y grants=y rows=y
full=y commit=y'

1.5 Connecting to Oracle Database

You can connect to the Oracle database in the following ways:

Check with the database administrator to see whether you can connect to the Oracle database using the listed methods, as the possibilities available are dependent on how the system has been installed. Usually, you specify the way you connect to the Oracle database as part of the logon string appended to the userid/password, and separated from it by an at sign (@), as illustrated in the following pages.

1.5.1 Default Connections

If you do not specify a connection string, then the environment variable DEFAULT_CONNECTION, if set, is used to establish the Oracle database connection. Refer to Appendix B, "ORAENV Variables" for more information on the ORAENV file and the DEFAULT_CONNECTION environment variable.

1.5.2 Connecting to the Oracle Database

Access to a local or remote database is done through Oracle Net Services. Use the Oracle Net Services logon string to identify the following for accessing a local or remote database:

  • Protocol to be used

  • Database you want to access

  • Type of server (whether dedicated or shared) you want to use

The Oracle Net Services logon string has the following structure:

/START-PROGRAM $ORAC1020.SQLPLUS
* userid/password@service_name

where:

service_name specifies a service name entered in the TNSNAMES.ORA file that identifies the TNS connect descriptor for the desired database. If you are not sure of what you should enter here, then contact the database administrator.

The following example logon string that connects to a database defined in the TNSNAMES.ORA file as SERVERX:

HR/HR@SERVERX

For information on connecting to the Oracle Database using the Bequeath adapter, refer to the "Oracle Net Services" chapter in Oracle Database Installation and Administration Guide for Fujitsu Siemens BS2000/OSD.

1.6 Using BS2000 Files for Input and Output

In most cases, Oracle Database for BS2000/OSD programs use the functions of the C-BS2000 run-time system to access their input and output files. Oracle Database programs can read and write SAM, ISAM, and PAM files.

1.6.1 Text Files

Textual data is usually stored in SAM or ISAM files; each record is taken to be one text line. Examples are the SQL script files used by SQL*Plus and spool output files.

SQL*Loader input data is provided as SAM or ISAM files. These files may also contain non-printable data, such as packed decimal or binary integer values. For ISAM files, the key at the beginning of the record is generally ignored.

1.6.2 Binary Files

Binary data is usually stored in PAM files.

1.6.3 Generic Oracle Database File Name Syntax

The convention used in generic Oracle Database documentation represents file names as two parts separated by a period, as in LOGIN.SQL. This syntax is correct for BS2000. However, as there is no "current directory" concept in BS2000, you have to add a prefix to the generic example names to get a full BS2000 file name.

1.6.4 Default File Name Extensions

Under BS2000/OSD, the Oracle Database utilities add default extensions to file names only when the last component of the specified file name is longer than three characters, or when only one component is specified, as shown in the following table.


Original File Name Extended File Name
1. TEST.TEST TEST.TEST.EXT
2. TST TST.EXT
3. T.T T.T
4. TEST.TST TEST.TST

This is similar to the file naming conventions used with Oracle Database on a UNIX system.

1.6.5 Using Link Names

Instead of specifying a file name, in special cases, you can also refer to the LINKNAME of a previously issued BS2000 /FILE command by using the syntax link=linkname in places where a file name is requested. In this way, you can override default file attributes, preallocate file space, and so on. There are a few exceptions where the link=linkname notation cannot be used.

Note:

When using the link=linkname notation, default file name extensions do not work. As a result, file name defaults derived from such notation are not valid, and you have to provide explicit names in such cases. For example, when working with SQL*Loader, if you specify link=linkname for the SQL*Loader control file, then you must provide explicit names for the BAD, LOG, and DISCARD file names.

Some programs may report a syntax error when the link=linkname notation is used on the command (options) line. In such cases, omit the parameter on the command line, and specify it instead when you are prompted for the missing parameter.

1.6.6 Fixed Link Names

Oracle Database 10g release 2 (10.2) for BS2000/OSD also assumes fixed link names for certain files whose names cannot be specified.

The most important of these are as follows:

Type Meaning/Usage
ORAENV The link name of the Oracle Database environment-definition file.
ORALOAD The link name is mandatory and is used to specify the load library from which the Oracle Database modules and data tables are loaded during processing.
ORAMESG The link name is mandatory and is used to specify the message library from which Oracle message modules are loaded during execution.

Typically, you set these link names by running the ORAENV procedure.