Skip Headers
Oracle® Database Administrator's Reference
10g Release 2 (10.2) for hp OpenVMS

Part Number B25416-02
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

2 Starting and Stopping Oracle Software

This chapter describes different ways to start up or shut down Oracle Database 10g. It contains the following topics:

2.1 Starting Up Oracle Database 10g

Before you can start Oracle Database 10g, ensure that both an instance and a database exist on the local system. If you did not install Oracle Database 10g, then consult the database administrator (DBA).

This section contains the following topics:

2.1.1 Before Starting Up

Note:

If you restarted the OpenVMS system (for example, due to a system failure), then you should read this section.

After restarting OpenVMS and before starting Oracle Database 10g, you must run the ORAUSER.COM file. In this command, you must specify the full directory path. For example:

$ @DISK$A31:[MYROOT]ORAUSER.COM

Note that when the DBA runs this file and the logical name ORA_AUTO_INSORACLE is defined as TRUE, a check is performed to determine if INSORACLE must be run. If required, INSORACLE is run. INSORACLE installs the shared global sections that make a shareable ORACLE image known to the system.

The following images are installed:

  • libclntsh.so

  • oracle.exe

Note:

By default, ORA_AUTO_INSORACLE is not defined as TRUE and ORAUSER will not attempt to run INSORACLE.

2.1.2 Starting Oracle Database 10g by Using SQL*Plus

You can start an instance of Oracle Database 10g using SQL*Plus. Refer to the instructions in this document on setting up SQL*Plus. Refer to the generic (platform-independent) Oracle Database documentation for instructions on using SQL*Plus.

You can choose to complete startup tasks separately when monitoring instance performance, for example. Alternatively, you can start an instance and then open a database after making some modifications.

2.1.2.1 Identifying the Current Instance

When starting up Oracle Database 10g, you start up the current instance. The current Oracle Database 10g instance is identified by the value of the logical name ORACLE_SID. For example, if the value of ORACLE_SID is currently V9, then the current instance is the instance with the SID V9. If you have not reassigned the ORACLE_SID logical name, then the value of ORACLE_SID is the SID specified during installation. To change the current instance before starting Oracle Database 10g with SQL*Plus, you should run the ORAUSER.COM file with the appropriate SID as parameter.

If ORACLE_SID is undefined or incorrect, then the following error message is displayed:

ORA-07582,  spstp: ORA_SID has an illegal value. 

2.1.2.2 Specifying Startup Parameters

When the current Oracle Database 10g 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 SQL*Plus, 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, then you must include the directory location of the file:

SQL> STARTUP PFILE=INITsid.ORA 

2.1.2.3 Starting the Server Using SQL*Plus

To start Oracle Database 10g, you must have the process rights identifier ORA_DBA or ORA_sid_DBA assigned to the user account in the OpenVMS rights database. In addition, you must run the COM file that makes the logical name assignments required to run Oracle Database 10g.

Before starting up Oracle Database 10g, run the ORAUSER.COM file to set the instance.

After running the ORAUSER.COM file, run SQL*Plus and run the appropriate STARTUP commands, as documented in Oracle Database Administrator's Guide (B10739-01). You can run the single SQL*Plus command, STARTUP, or run the three separate SQL*Plus commands documented in Oracle Database Administrator's Guide (B10739-01) to start Oracle Database 10g Enterprise Edition.

The SQL*Plus command STARTUP starts the current Oracle instance, creating the SGA in OpenVMS shared memory and creating the detached processes. It then mounts the database and opens it.

2.1.3 Starting Oracle Database 10g Remotely by Using SQL*Plus from an OpenVMS Client

You can use SQL*Plus on an OpenVMS client to start up an Oracle Database 10g database instance on a remote OpenVMS system.

2.1.3.1 Steps to Perform on a Remote System Database

The following steps must be performed on the remote system where the database resides:

  1. Create a password file using ORAPWD. The password file can be either exclusive or shared. For this example, assume that an exclusive password file is used. The syntax for ORAPWD is as follows:

    $ ORAPWD FILE=fname PASSWORD=password ENTRIES=users
    
    
  2. Define a system logical name to point to the location of the password file. For example:

    For an exclusive password file:

    $ DEFINE/SYSTEM/EXEC ORA_sid_PWFILE -
      @DISK:[directory]fname
    
    

    For a shared password file:

    $ DEFINE/SYSTEM/EXEC ORA_PWFILE - 
      @DISK:[directory]fname
    
    
  3. Edit INITsid.ORA and add the following line:

    For an exclusive password file:

    REMOTE_LOGIN_PASSWORDFILE = EXCLUSIVE
    
    

    For a shared password file:

    REMOTE_LOGIN_PASSWORDFILE = SHARED
    
    
  4. Stop and restart the database instance.

  5. Copy INITsid.ORA from the server to any directory on the client.

  6. Start the SQLNET listener on the local system. The SQLNET listener must be configured to service connections specified by the TNSNAMES.ORA entry, which is defined in the following section.

2.1.3.2 Steps to Perform on a OpenVMS Client System

The following steps must be performed on the client system from which the database is to be started:

  1. Ensure that there is a TNSNAMES.ORA entry for the SID on the remote system where the database resides.

  2. Define the process logical name ORA_DFLT_HOSTSTR to the Oracle Network Alias for the remote system. For example:

    $ DEFINE ORA_DFLT_HOSTSTR Oracle_Net_Alias
    
    
  3. Define the process logical name that points to the complete file specification for the INIT file copied in Step 5 of the preceding section. For example:

    $ DEFINE ORA_PARAMS - 
      ddcn:[directory]INIT.ORA
      
    
  4. Start SQL*PLUS, and run the commands as follows. When prompted for the password, enter the password you specified in Step 1 of the preceding section when the password file was created.

    $ sqlplus "/ as sysdba"
    SQL*Plus: Release 10.2.0.2.0 - Production on Thu Nov 2 07:24:54 2006
    
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to an idle instance.
    SQL> startup  pfile=<pfile location>
    ORACLE instance started.
    
    Total System Global Area  555189984 bytes
    Fixed Size                   730848 bytes
    Variable Size              520093696 bytes
    Database Buffers           33554432 bytes
    Redo Buffers                 811008 bytes
    Database mounted.
    Database opened.
    SQL>
    
    
  5. At this point, the remote database is up and running.

2.1.4 Starting Oracle Database 10g Remotely by Using SQL*Plus from a Microsoft Windows PC Client

The following steps must be performed on the remote system where the database resides.

2.1.4.1 Steps to Perform on Remote System Database

Perform the steps listed under Section 2.1.3.1, "Steps to Perform on a Remote System Database".

2.1.4.2 Steps to Perform on a Microsoft Windows Client System

The following steps must be performed on the client system from which the database is to be started:

  1. Ensure that there is a TNSNAMES.ORA entry for the SID on the remote system where the database resides.

  2. Start SQL*Plus on your Microsoft Windows Client System.

    When prompted for the password, enter the password specified in Step 1 of the preceding procedure when the password file was created. Assume the TNSNAMES.ORA alias for the remote database is net_V10_alias.

    SQL> connect @net_V10_alias 
    Password:
    SQL> startup pfile=DOS path to INIT.ORA
    ORACLE instance started.
    Total System Global Area              555189984 bytes
    Fixed Size                               730848 bytes
    Variable Size                         520093696 bytes
    Database Buffers                       33554432 bytes
    Redo Buffers                             811008 bytes
    Database mounted.
    Database opened.
    SQL> exit
    
    
  3. At this point, the remote database is up and running.

2.2 Shutting Down Oracle Database 10g

This section describes the following methods for shutting down Oracle Database 10g:

After all instances on a node have been shut down, you can remove the sharable images.

2.2.1 Shutting Down Oracle Database 10g by Using SQL*Plus

You can shut down an instance of Oracle Database 10g by using SQL*Plus. Refer to Chapter 4, "Administering SQL*Plus" in this document for instructions on setting up SQL*Plus. Then, refer to the generic (platform-independent) Oracle Database documentation for instructions on using SQL*Plus.

2.2.2 Stopping Oracle User Processes Before Database Shutdown

The SHUTDOWN IMMEDIATE command may not work if you have persisting connections in the environment. For example, if you are running processes associated with monitoring tools such as Oracle Enterprise Manager Agent. In that case, it is advisable to terminate the connections from the operating system level by running the following command:

$ STOP/ID=pid

Use the procedure below to identify which processes can be stopped.

For example, from a separate SQL*Plus session, run the following query:

SQL> SELECT sid,serial#,process FROM v$session WHERE type!='background'AND program!='Oracle';

Suppose the processes that are listed in the following table are the ones that are currently running.

SID Serial Process
1 1 20C0018B
2 1 20C0018C
3 1 20C0018D
4 1 20C0018E
5 1 20C0018F
6 1 20C002DD

Then, you can run commands similar to the following to stop these processes:

SQL>HOST STOP/ID=20C0018B
SQL>HOST STOP/ID=20C0018C,

2.2.3 Removing Sharable Images

After shutting down all Oracle Database 10g instances on a node, if you want to perform code relink, remove the sharable images by running the following command:

$ REMORACLE

2.3 Oracle Net Listener

This section describes how to stop and start Oracle Net listener.

Stopping Oracle Net Listener

To stop an Oracle Net listener:

  1. Set up the Oracle environment for the Oracle home by running ORAUSER.COM with the required sid parameter.

    Note:

    Do not relocate ORAUSER.COM during the installation. It must reside at the top level of the Oracle installation directory.
  2. Stop the Oracle Net listener by running the following command:

    $ LSNRCTL STOP listenername
    
    

    Note:

    If the name of the listener is the default name LISTENER, then you do not have to specify the name in this command.

Restarting Oracle Net Listener

To start an Oracle Net listener:

  1. Set up the Oracle environment for the Oracle home by running ORAUSER.COM with the appropriate sid parameter.

    Note:

    Do not relocate ORAUSER.COM during the installation. It must reside at the top level of the Oracle installation directory.
  2. Restart the Oracle Net listener using the following command:

    $ LSNRCTL START listenername
    

    Note:

    If the name of the listener is the default name LISTENER, then you do not have to specify the name in this command.

2.3.1 Oracle Management Agent

If you are using Oracle Enterprise Manager Grid Control to manage multiple Oracle products from a central location, then you must have an Oracle Management Agent installed on each host system. Typically, an Oracle Management Agent is installed in its own Oracle home directory.

This section describes how to stop and start an Oracle Management Agent.

Stopping Oracle Management Agent

To stop an Oracle Management Agent:

  1. Set up the Oracle environment for the Oracle home by running ORAUSER.COM with the required sid parameter.

    Note:

    Do not relocate ORAUSER.COM during the installation. It must reside at the top level of the Oracle installation directory.
  2. Enter the following command:

    $ EMCTL STOP AGENT
    

Starting Oracle Management Agent

To start Oracle Management Agent:

  1. Set up the Oracle environment for the Oracle home by running ORAUSER.COM with the appropriate sid parameter.

    Note:

    Do not relocate ORAUSER.COM during the installation. It must reside at the top level of the Oracle installation directory.
  2. Enter the following command:

    $ EMCTL START AGENT