| Oracle8i Server and Tools Administrator's Guide Release 3 (8.1.7) for Alpha OpenVMS Part Number A86712-01 |
|
This chapter describes different ways to start up or shut down the Oracle8i Enterprise Edition. These methods include using ORACLEINS, using STARTUP and SHUTDOWN files, or using Server Manager.
The following topics are presented:
Before you can start the Oracle8i Enterprise Edition, both an instance and a database must exist on your local system. If you did not install the Oracle8i Enterprise Edition, consult the person who did.
This section presents the following topics:
If you rebooted your Alpha OpenVMS system (for example, due to a system crash), you should read this section. If not, you can skip this section.
After rebooting Alpha OpenVMS, you must perform the following steps before starting the Oracle8i Enterprise Edition:
$ @DISK$A31:[MYROOT.UTIL]ORAUSER.COM
This file installs the shared global sections that make a shareable ORACLE image known to the system.
The following images are installed:
Each of these images must have proper protection when you run INSORACLE. The account where you run INSORACLE.COM must have CMKRNL privilege.
You must perform step2 under the following conditions:
To start Oracle8i using ORACLEINS, do the following steps:
$ @ORA_DB:ORAUSER_<dbname>.COM <sid> <setup_nodename>
Currently known database SIDs:
[list of known SIDs]
Press [RETURN] to quit with no action.
NOTE: The SID can be a maximum of 6 characters in length.
What is the SID for the instance to startup?
You can also use command files to start Oracle8i. The file you execute depends on whether you are running in exclusive or in parallel mode. For more information about instances, see Chapter 4, "Managing Instances" in this guide.
Run the following STARTUP command file for the instance you want to start:
$ @ORA_DB:STARTUP_<dbname>.COM <sid> <setup_nodename>
This file is located in the database-specific directory identified by the logical name ORA_DB. When you start up the instance, be sure to specify the SID of the instance and its setup node.
You can also start an instance of Oracle8i using Server Manager. See the instructions in this manual on setting up Server Manager on your Alpha OpenVMS platform. Refer to the generic (platform-independent) Oracle Server documentation for instructions on using Server Manager.
You might choose to complete startup tasks separately when monitoring instance performance, for example, or you might want to start an instance and open a database after making some modifications.
When starting up the Oracle8i Enterprise Edition, you start up the current instance. The current Oracle8i instance is identified by the value of the logical name ORA_SID. For example, if the value of ORA_SID is currently V817, the current instance is the instance with the SID V817. If you have not reassigned the ORA_SID logical name, the value of ORA_SID is the SID specified during installation. To change the current instance before starting the Oracle8i Enterprise Edition with Server Manager, you should run the ORAUSER_<dbname>.COM file for the instance in question.
If ORA_SID is undefined or incorrect, you receive the following error:
ORA-07582, spstp: ORA_SID has an illegal value.
When the current Oracle8i instance is started, the SGA is created and initialized with the startup parameters set in the distributed parameter file, INIT.ORA, in the ORA_DB directory. When using Server Manager, you can use another startup file that sets different parameter values by including the PFILE option with the STARTUP command to identify an alternative parameter file. If the file is not in the current default directory, you must include the directory location of the file:
SVRMGR> STARTUP PFILE=ORA_DB:INIT2.ORA
To start Oracle8i, you must have the process rights identifier ORA_DBA or ORA_<sid>_DBA assigned to your user account in the Alpha OpenVMS rights database and you must run the .COM file that makes the logical name assignments required to run Oracle8i.
Before starting up Oracle8i, run the ORAUSER_<dbname>.COM file to set the desired instance.
After running the above .COM file, run Server Manager and execute the appropriate STARTUP command(s), as documented in the Oracle8i Server Administrator's Guide. You can issue the single Server Manager command, STARTUP, or execute the three separate Server Manager commands documented in the Oracle8i Server Administrator's Guide to start the Oracle8i Enterprise Edition.
The Server Manager command STARTUP starts the current ORACLE instance, creating the SGA in Alpha OpenVMS shared memory and creating the detached processes. It then mounts the database and opens it.
You can use Server Manager on an OpenVMS client to start up an Oracle8i database instance on a remote Alpha OpenVMS system.
The following steps must be performed on the remote system where the database resides:
$ ORAPWD FILE=<fname> PASSWORD=<password> ENTRIES=<users>
If using an exclusive password file:
$ DEFINE/SYSTEM/EXEC ORA_<sid>_PWFILE -ddcn:[directory]<fname>
$ DEFINE/SYSTEM/EXEC ORA_PWFILE -ddcn:[directory]<fname>
ORA_DB:<nodename>_<sid>_INIT.ORA and add the following line:
If using an exclusive password file:
REMOTE_LOGIN_PASSWORDFILE = EXCLUSIVE
REMOTE_LOGIN_PASSWORDFILE = SHARED
ORA_DB:<nodename>_<sid>_INIT.ORA and ORA_DB:INIT.ORA from the server to any directory on the client.
The following steps must be performed on the client system from which the database is to be started:
TNSNAMES.ORA entry for the SID on the remote system where the database resides.
ORA_DFLT_HOSTSTR to the SQL*Net V8 ALIAS for the remote system. For example:
$ DEFINE ORA_DFLT_HOSTSTR <SQL*Net V8 alias>
INIT file copied in Step 5 above. For example:
$ DEFINE ORA_PARAMS -
ddcn:[directory]<nodename>_<sid>_INIT.ORA
_<sid>_INIT.ORA and INIT.ORA files and modify any IFILE parameters to point to the local directory on the client where these files are located.
SVRMGRL and issue the commands as follows. When prompted for the password, enter the password specified in Step 1 above (server side) when the password file was created.
$ svrmgrli
Oracle Server Manager Release 3.1.7.0.0 - Production
c) Copyright 1997, 2000 Oracle Corporation. All Rights Reserved.
Oracle8Enterprise Edition Release 8.1.7 - Production
PL/SQL Release 8.1.7 - Production
SVRMGR> connect internal as sysdba
Password:
SVRMGR> startup
ORACLE instance started.
Total System Global Area 11381296 bytes
Fixed Size 59952 bytes
Variable Size 10969088 bytes
Database Buffers 204800 bytes
Redo Buffers 147456 bytes
Database mounted.
Database opened.
SVRMGR> exit
Server Manager complete.
The following steps must be performed on the remote system where the database resides:
$ ORAPWD FILE=<fname> PASSWORD=<password> ENTRIES=<users>
If using an exclusive password file:
$ DEFINE/SYSTEM/EXEC ORA_<sid>_PWFILE -ddcn:[directory]<fname>
$ DEFINE/SYSTEM/EXEC ORA_PWFILE -ddcn:[directory]<fname>
ORA_DB:<nodename>_<sid>_INIT.ORA and add the following line:
If using an exclusive password file:
REMOTE_LOGIN_PASSWORDFILE = EXCLUSIVE
REMOTE_LOGIN_PASSWORDFILE = SHARED
ORA_DB:<nodename>_<sid>_INIT.ORA and ORA_DB:INIT.ORA from the server to any directory on the client.
The following steps must be performed on the client system from which the database is to be started:
TNSNAMES.ORA entry for the SID on the remote system where the database resides.
_<sid>_INIT.ORA, INIT.ORA files that were copied from the server and change all the IFILE parameters to point to the local DOS path to which these files were copied.
\ORAWIN\BIN for Windows 3.x, \ORAWIN95\BIN for Windows95, and \ORANT\BIN for Windows NT. When prompted for the password, enter the password specified in Step 1 above (server side) when the password file was created. net8_V8_ALIAS is the TNSNAMES.ORA alias for the remote database.
Oracle Server Manager Release 3.1.7.0.0 - Productioni
(c) Copyright 2000, Oracle Corporation. All Rights Reserved.
Oracle8Enterprise Edition Release 8.1.7 - Production
PL/SQL Release 8.1.7 - Production
SVRMGR> connect internal@<net8_V8_alias>
Password:
SVRMGR> startup pfile=<DOS path to <node>_<sid>_INIT.ORA>
ORACLE instance started.
Total System Global Area 11381296 bytes
Fixed Size 59952 bytes
Variable Size 10969088 bytes
Database Buffers 204800 bytes
Redo Buffers 147456 bytes
Database mounted.
Database opened.
SVRMGR> exit
Server Manager complete.
To start Oracle8i automatically whenever you start Alpha OpenVMS, submit the Oracle8i start procedure as a batch job from the system startup file. This batch job must:
ORAUSER.COM file to define the logical names and symbols referenced by Oracle8i
ORA_RDBMS:INSORACLE.COM to install the global sections required by Oracle8i
$ @ORA_DB:STARTUP_<dbname>.COM
or
$ @ORA_DB:STARTUP_<dbname>.COM
A sample startup file that starts two Oracle8i systems automatically after a system reboot is shown below:
$! STARTORAV8.COM
$! This script shows how one might start two Oracle
$! database instances at system boot time
$!----------------------------------------------------------$! Get the name of the node.
$!
$ NODENAME = F$GETSYI("NODENAME")
$!
$! Acquire CMKRNL privilege to install ORACLE
$! IMAGES. Exit with error if you are not so
$! authorized.
$!
$ SET PROCESS/PRIVILEGES=CMKRNL
$ IF (F$PRIVILEGE("CMKRNL") .EQS. "FALSE") THEN EXIT 2
$!
$! Define symbols specific to this release of ORACLE
$! code by running the appropriate ORAUSER.COM:
$!
$ @DISK$ORACLE:[ORACLE.V8.UTIL]ORAUSER.COM
$!
$! Install shared images:
$!
$ INSORACLE ! Install shared ORACLE image
$!
$! Start a database instance.
$!
$ INSTSID = "PROD1" ! Define SID
$ DB_NAME = "PROD" ! Define database name
$ GOSUB START_DATABASE
$!
$! Start a second database instance.
$!
$ INSTSID = "PROD2" ! Define sid
$ DB_NAME = "TEST" ! Define database name
$ GOSUB START_DATABASE
$ EXIT
$!
$! Invoke the database-specific startup script. Assumes
$! that ORA_DB for each database is under ORA_ROOT.
$! This need not be the case.
$!
$START_DATABASE:
$ @ORA_ROOT:[DB_'DB_NAME']STARTUP_'DB_NAME'.COM - 'INSTSID' 'NODENAME'
$ RETURN
In this sample startup file, the systems share the same copy of Oracle8i code. The example assumes that the Oracle8i root directory is DISK$ORACLE:[ORACLE.V8].
Run this file as a batch job under the Oracle8i account as part of the standard system startup procedure. Keep this file in the Oracle8i account login directory.
For example, if the Oracle8i account resides in DISK$ORACLE:[ORACLE], and the startup script is named STARTORAV8.COM, then you would start this script at boot time by adding the following lines to SYS$MANAGER:SYSTARTUP_VMS.COM:
$ filspc = "DISK$ORACLE:[ORACLE]STARTORAV8"
$ submit-
/user=Oracle8-
/after="+00:05:00"-
/log='filspc'.log-
'filspc'
To shut down Oracle8i, you can use one of these methods:
After all instances on a node have been shut down, you must de-install the shareable images. See the following section for information on de-installing images:
This section describes the three methods of shutting down Oracle8i and then tells how to deinstall shareable images.
SHUTDOWN IMMEDIATE will hang if you issue the command ALTER SYSTEM KILL SESSION <session> immediately followed by a HOST STOP/ID=<pid> on the processes associated with those Oracle sessions. When you issue an ALTER SYSTEM KILL SESSION command, it marks the process for deletion by PMON. If you then kill the process before PMON can get to it, confusions results and a clean process deletion does not occur. The deleted process appears to still be connected. Thus, the SHUTDOWN IMMEDIATE hangs and the partially dead process can't respond to the logoff command issued by the SHUTDOWN. For example:
Process 1:
SVRMGR> startup
SVRMGR> select sid,serial#,process from v$session;
| SID | SERIAL# | PROCESS |
| 1 | 1 | 20C0018B |
| 2 | 1 | 20C0018C |
| 3 | 1 | 20C0018D |
| 4 | 1 | 20C0018E |
| 5 | 1 | 20C0018F |
| 6 | 1 | 20C002DD |
6 rows selected.
Process 2 with OS-process id 20C00470:
$ sqlplus <un>/<pw>
Process 1:
select sid,serial#,process from v$session;
| SID | SERIAL# | PROCESS |
| 1 | 1 | 20C0018B |
| 2 | 1 | 20C0018C |
| 3 | 1 | 20C0018D |
| 4 | 1 | 20C0018E |
| 5 | 1 | 20C0018F |
| 6 | 1 | 20C002DD |
| 8 | 11 | 20C00470 |
7 rows selected.
SVRMGR> alter system kill session '8, 11';
Statement processed.
SVRMGR> host stop/id=20C00470
SVRMGR> shutdown immediate
... shutdown hangs ...
The solution is to use either ALTER SESSION KILL SESSION or HOST STOP/ID=. Don't use both. A pause before the SHUTDOWN so than PMON can clean up can also be a good idea.
To shut down Oracle8i using ORACLEINS:
$ @ORA_DB:ORAUSER_<dbname>.COM <sid> <setup_nodename>
Currently known database SIDs: [list of known SIDs] Press [RETURN] to quit with no action. NOTE: The SID can be a maximum of 6 characters in length. What is the SID for the instance you want to shut down?
To shut down the currently running ORACLE instance, use the following command file:
$ @ORA_DB:SHUTDOWN_<dbname>.COM <sid> <setup_nodename>
This file is located in the database-specific directory identified by the logical name ORA_DB. When you shut down the instance, be sure to specify the SID of the instance and its setup node.
A sample shutdown file that shuts down two Oracle8i systems automatically is shown below:
$!
$! NAME: STOPORAV8.COM
$! Note that this script will hang if users are still
$! connected to the databases unless you modify the
$! shutdown scripts to issue SHUTDOWN IMMEDIATE commands.
$!----------------------------------------------------------
$!
$! Get the name of the node:
$!
$ NODENAME = F$GETSYI("NODENAME")
$!
$! Acquire CMKRNL privilege to remove the Oracle
$! shareable images. Exit with error if you are not so
$! authorized.
$!
$ SET PROCESS/PRIVILEGES=CMKRNL
$ IF (F$PRIVILEGE("CMKRNL") .EQS. "FALSE") then exit 2
$!
$! Define symbols and logicals specific to this release
$! of the Oracle code by running ORAUSER.COM
$!
$!
$ @DISK$ORACLE:[ORACLE.V8.UTIL]ORAUSER.COM
$!
$! Shut down a database instance
$!
$ INSTSID = "PROD1" ! Define SID
$ DB_NAME = "PROD" ! Define Database Name
$ GOSUB DO_SHUTDOWN
$!
$! Shut down a second database instance
$!
$ INSTSID = "PROD2" ! Define SID
$ DB_NAME = "TEST" ! Define Database Name$! De-install Oracle shareables
$ GOSUB DO_SHUTDOWN
$!
$!
$! $ REMORACLE
$ EXIT
$!
$ DO_SHUTDOWN:
$ @ORA_ROOT:[DB_'DB_NAME']SHUTDOWN_'DB_NAME'.COM 'INSTSID'-
'NODENAME'
$ RETURN
You can shut down an instance of Oracle8i using Server Manager. See Chapter 5 in this manual for instructions on setting up Server Manager on your Alpha OpenVMS platform. Then, refer to the generic (platform-independent) Oracle Server documentation for instructions on using Server Manager.
After shutting down all Oracle8i instances on a node, remove the shareable images by issuing the following command:
$ @REMORACLE
For more information about these utilities, see Chapter 8 of this Guide.
|
|
![]() Copyright © 2000 Oracle Corporation. All Rights Reserved. |
|