Oracle8 Enterprise Edition Getting Started
Release 8.0.4 for Windows NT

A55928-01

Library

Product

Contents

Index

Prev Next

10
Administering a Database

This chapter describes how to administer Oracle8 Enterprise Edition.

Specific topics discussed are:

Managing Oracle Services

This section provides information on the following:

Oracle Service Naming Conventions for Multiple Oracle Homes

Oracle8 Enterprise Edition allows you to have multiple, active Oracle home directories on a single computer. Chapter 6, "Using Multiple Oracle Homes" describes this feature. Multiple Oracle homes affect the naming conventions for Oracle services. If you have only one Oracle home directory on a computer, there are no differences between the naming conventions for service names in this release and previous releases (that is, no Oracle home name and the SID is typically the default of ORCL). However, as you perform additional installations into Oracle home directories:

This affects service names. This table describes how two service names, OracleTNSListener80 and OracleServiceORCL, are affected when you install three Oracle8 databases into separate directories:

For the...   The Home Name is...   The SID is Named...   The Services are Named...  

First Oracle home installation on a computer.  

Not required.  

ORCL  

OracleTNSListener80 OracleServiceORCL  

Second Oracle home installation on a computer.  

Required; for this example, PROD is entered when prompted during installation.  

ORC1  

OraclePRODTNSListener80OracleServiceORC1  

Third Oracle home installation on a computer.  

Required; for this example, SALES is entered when prompted during installation.  

ORC2  

OracleSALESTNSListener80OracleServiceORC2  

These two figures show how the Services dialog box appears with two Oracle8 database on a single computer:

.

Available Oracle Services

Depending on the products that you have installed, a number of Oracle services are started when you restart your Windows NT computer. The three main Oracle services are:

Service Name   Description  

OracleServiceSID  

Created for the database instance SID. An Oracle instance is a logical term that refers to:

  • an Oracle service called OracleServiceSID
  • a database

Each Oracle instance must have a system identifier (SID). A SID is a unique name for an Oracle database instance that can be up to four alphanumeric characters in length.

For example, if the SID for the Oracle8 database is ORCL, it is appended to the service OracleService. Each file for the database instance ORCL in the ORACLE_HOME\ DATABASE directory has ORCL as part of its name (for example, CTL1ORCL.ORA, LOG1ORCL.ORA, and INITORCL.ORA). The instance name is the same as the value of the ORACLE_SID registry configuration parameter.

To connect to a specific Oracle database, users must specify a service name (database alias) that contains a SID for that database.  

OracleStartSID  

Starts the database instance SID automatically whenever the Windows NT computer restarts.  

OracleTNSListener801  

Listens for and accepts incoming connection requests from client applications. Automatically starts when the Windows NT computer restarts.  

1 This is the name for this service if you have only one Oracle home directory on your computer. Each additional Oracle home directory on your computer uses the naming convention OracleHOME_NAMETNSListener80 for this service. See Chapter 6, "Using Multiple Oracle Homes" for information.

See Chapter F, "Troubleshooting" for error messages that you can receive if you attempt to connect to the Oracle8 database without these services running.

Additional Oracle services related to specific products or database features are also available:

Service Name   Description  

OracleAgent  

Listens for and responds to job and event requests sent from the Oracle Enterprise Manager console.  

OracleConTextService801  

ConText server processes started on an NT server are normally terminated by Windows NT when the user logs off. This service can be used to start server processes that survive logouts.  

OracleExtprocAgent1  

Enables external procedure callouts from PL/SQL to the database to be implemented with multiple, light-weight threads instead of a single dedicated process.  

OracleWebAssistant2  

Enables information from database queries to be published to a web page at specified time intervals.  

1 These are the names for these services if you have only one Oracle home directory on your computer. Each additional Oracle home directory on your computer uses the naming convention OracleHOME_NAMEConTextService80 or OracleHOME_NAMEExtprocAgent for these services. See Chapter 6, "Using Multiple Oracle Homes" for information.
2 This is the name for this service if you have only one Oracle home directory on your computer. Each additional Oracle home directory on your computer uses the naming convention OracleWebAssistant1, OracleWebAssistant2, and so on for this service. See Chapter 6, "Using Multiple Oracle Homes" for information.

Services for network products are also available. See Appendix E, "Net8 Services and Ports" in Net8 Getting Started for Windows NT and Windows 95 for information on Oracle network services.

Starting Oracle Services

Oracle services must be started for you to use the Oracle8 database and its products.

Start Oracle services in either of two ways:

To start Oracle Services from the Control Panel:

  1. Choose Start > Settings > Control Panel.

    The Control Panel window appears.

  1. Double-click Services.

    The Services dialog box appears.

  2. Find the service you want to start in the list, and verify that it has a status of Started. If it does not, select it and choose Start.

To start Oracle Services from the MS-DOS command prompt:

  1. Enter the following command to start an Oracle service at the MS-DOS command prompt:

    C:\> NET START SERVICE
    

    where SERVICE is a specific service name, such as OracleServiceORCL.

If you cannot find OracleServiceSID or OracleTNSListener80 (or OracleHOME_NAMETNSListener80) in the list, use ORADIM80 to create them. See Chapter 3, "Database Tools Overview" for instructions on using ORADIM80.

Stopping Oracle Services

On occasion (for example, if you want to re-install the Oracle8 database), you must stop Oracle services. Stop Oracle services in either of two ways:

To stop Oracle8 Services from the Control Panel:

  1. Choose Start > Settings > Control Panel.

    The Control Panel window appears.

  1. Double-click Services.

    The Services dialog box appears.

  2. Select OracleTNSListener80 (or OracleHOME_NAMETNSListener80, where HOME_NAME is the Oracle home name for the listener to stop) and choose Stop.

  3. Select OracleServiceSID and choose Stop.

    The Stopping dialog box informs you that OracleStartSID will also be stopped.

  4. Click OK.

    Both OracleServiceSID and OracleStartSID are stopped.

To stop Oracle Services from the MS-DOS command prompt:

  1. Enter the following command to stop an Oracle service at the MS-DOS command prompt:

    C:\> NET STOP SERVICE
    

    where SERVICE is a specific service name, such as OracleServiceORCL.

Auto-starting Oracle Services

You can start Oracle services whenever the Windows NT computer is restarted. Use the Service dialog box to configure when and how the Oracle8 database is started.

To automatically start the Oracle8 database each time you restart:

  1. Choose Start > Settings > Control Panel.

    The Control Panel window appears.

  1. Double-click Services.

    The Services dialog box appears.

  2. Select the service OracleStartSID and choose the Startup button.

    The Service dialog box appears.

  3. Choose Automatic from the Startup Type field.

  4. Click OK.

  5. Click Close to exit the Services dialog box.

Starting and Shutting Down a Database with Server Manager

These instructions assume that a database instance is created and the services are started.

To start or shut down an Oracle8 database:

  1. Go to your Oracle8 database server.

  1. Start Server Manager at the MS-DOS command prompt:

    C:\> SVRMGR30
    

  2. Connect to the Oracle8 database with the INTERNAL user name:

    SVRMGR> CONNECT INTERNAL/PASSWORD
    

  3. Follow the instructions below:
    If You Want to...   Then Enter...  

    Start a database with the default parameter file  

    SVRMGR> STARTUP

    This command uses the default INITSID.ORA file located in the ORACLE_HOME\DATABASE directory  

    Start a database with a file other than the default parameter file  

    SVRMGR> STARTUP PFILE=PATH\FILENAME

    This command uses the INITSID.ORA file specified in PATH\FILENAME. This example starts the database using a file named INIT2.ORA in C:\ORANT \RDBMS80:  

     

    SVRMGR> STARTUP PFILE=C:\ORANT\RDBMS80\INIT2.ORA  

    Stop the database  

    SVRMGR> SHUTDOWN [MODE]  

     

    where MODE is one of the following:  

     

    • Normal
     

     

    The database waits for all currently connected users to disconnect and disallows any new connections before shutting down. This is the default mode.  

     

    • Immediate
     

     

    The database terminates and rolls back active transactions, disconnects clients, and shuts down.  

     

    • Abort
     

     

    The database terminates active transactions and disconnects users; it does not roll back transactions. The database performs automatic recovery and rollback the next time it is started. Use this mode only in emergencies.  


    Note:

    See "Choosing a Database Tool" in Chapter 3, "Database Tools Overview" for a list of other tools that can start the database and the Oracle8 Administrator's Guide for information on options you can specify when starting your database.

     

Starting and Shutting Down a Database with Oracle Enterprise Manager

Oracle Enterprise Manager enables you to start and shut down your Oracle8 database in several different ways. This section describes how to use the Navigator. You can also use:

See Chapter 10, "Managing Instances and Sessions" in Oracle Enterprise Manager Administrator's Guide for information on using these tools to start your database.

These instructions assume that a database instance is created and the services are started.

To start or shut down a database:

  1. Ensure that you:

  1. Go to your Oracle Enterprise Manager Console computer.

  2. Choose Start > Programs > Oracle Enterprise Manager > Enterprise Manager.

    The Repository Login Information dialog box appears:

  3. Enter the login information you created in "Step 2: Create a Repository User Account" of Chapter 8, "Post-Installation Configuration Tasks":

    • Repository user name and password
    • Net8 service name (or database alias) of the repository database; it is only necessary to enter a service name if you are connecting from a client console to the Oracle8 repository database on a different computer

    The Oracle Enterprise Manager Console appears. The Navigator Window displays in the upper-left portion of the console.

  4. Double-click Databases in the Navigator window of the Oracle Enterprise Manager Console.

    The list of databases in your Oracle Enterprise Manager network appears.

  5. If you have never started or shut down a database with the Navigator, you must first perform steps 6a through 6h. If you have previously started or shut down a database with the Navigator, go to step 7.

    1. Select the database to administer.

    2. Choose Tools > Applications > Oracle Instance Manager from the main menu.

      The Login Information dialog box appears.

    3. Enter the INTERNAL user name and password, and Net8 service name for the Oracle8 database to start up or shut down.

    4. Click OK.

      The Oracle Instance Manager window appears.

    5. Double-click Initialization Parameters in the Navigator tree.

      The initialization parameters appear for the Oracle8 database that you want to start or shut down.

    6. Click Save.

      The Save Configuration dialog box appears.

    7. Enter an appropriate configuration name for the initialization parameters (for example, SALES_DB) and click OK.

      This stores the initialization parameter information for the Oracle8 database in the repository.

    8. Choose Exit to Console from the File menu.

      You are returned to the Oracle Enterprise Manager Console.

  6. Right-click the database in the Navigator tree that you want to start or stop.

    A menu appears with options for starting or shutting down the database:

  7. If you have never started or shut down a database with the Navigator, you must first perform steps 8a through 8b. If you have previously started or shut down a database with the Navigator, go to step 9.

    1. Choose Connect from the menu that appears.

      The Login Information dialog box appears.

    2. Enter the INTERNAL user name and password, and click OK.

      You are returned to the same menu with options for starting and shutting down the database.

  8. Select one of the following:

    If You Want to...   Then...  

    Start the database  

    1. Choose Startup.

     

     

    The Startup dialog box appears:

     

     

    1. Provide the appropriate information and choose OK.

     

     

    Your Oracle8 database starts.  

    Shut down the database  

    1. Choose Shutdown.

     

     

    The Shutdown Options dialog box appears:

     

     

    1. Provide the appropriate information and choose OK.

     

     

    Your Oracle8 database shuts down.  

Shutting Down a Database By Stopping a Service

You can immediately shut down the Oracle8 database by stopping the service OracleServiceSID. This automated procedure is equivalent to manually entering the following commands:

C:\> SVRMGR30
SVRMGR> CONNECT INTERNAL/PASSWORD
SVRMGR> SHUTDOWN IMMEDIATE

This causes the database to terminate and roll back active transactions, disconnect clients, and shut down.

To use this feature, you must set either of two registry parameter values to TRUE in registry.

Registry Parameter   When set to TRUE...  

ORA_SHUTDOWN  

Enables the selected Oracle8 database to be shut down. This includes any database in the current Oracle home.  

ORA_SID_SHUTDOWN  

Shuts down the Oracle8 database identified by the SID value.  

If either of these parameters is set to FALSE (the default setting), you cannot shut down the database by stopping OracleServiceSID. In addition, two other registry parameters are available:

ORA_SHUTDOWN_TIMEOUT, ORA_SID_SHUTDOWN, and ORA_SID_SHUTDOWN_TIMEOUT must be added to the registry. Where to add these parameters is determined by the Oracle home directory that you are using:

If You Have...   Then Add These Parameters in...  

One home directory  

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE  

Additional directories  

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID

where ID is incremented for each additional Oracle home directory on your computer.  

To immediately shut down the database by selecting OracleServiceSID:

  1. Set ORA_SHUTDOWN or ORA_SID_SHUTDOWN to TRUE in the registry. The exact location of these parameters is determined by the number of Oracle home directories on your computer:

    If You Have...   These Parameters are Located in...  

    One home directory  

    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE  

    Two or more home directories  

    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ HOMEID

    where ID is incremented for each additional Oracle home directory on your computer.  

    See Appendix C, "Configuration Parameters and the Registry" for instructions on adding and editing registry parameters.

  1. Stop and restart OracleServiceSID and restart the database for the change to take effect.

  2. Choose Start > Settings > Control Panel.

    The Control Panel window appears.

  3. Double-click Services.

    The Services dialog box appears.

  4. Select OracleServiceSID and choose Stop.

    This automatically starts Server Manager, issues the SHUTDOWN IMMEDIATE command, and shuts down your Oracle8 database.

Running Multiple Instances

To run multiple instances, ensure that you have already created each instance and started the services for each instance using ORADIM80 or the Services dialog box in Windows NT. You then run multiple instances by starting each of the instances using Server Manager.

To run multiple instances:

  1. Set the ORACLE_SID configuration parameter at the MS-DOS command prompt to the SID for each instance you want to run:

    C:\> SET ORACLE_SID=SID
    

    where SID is the name of the Oracle8 database instance.

  1. Start Server Manager:

    C:\> SVRMGR30
    

  2. Connect as INTERNAL:

    SVRMGR> CONNECT INTERNAL/PASSWORD
    

  3. Start up the database with the new instance:

    SVRMGR> STARTUP PFILE=ORACLE_HOME\DATABASE\INITSID.ORA
    

    where SID is the name of the instance. With Server Manager, you can use the %ORACLE_HOME% variable for ORACLE_HOME.

Creating Password Files

Use the Password Utility ORAPWD80 to create password files. ORAPWD80 is automatically installed with the Oracle8 Utilities. Password files are located in the ORACLE_HOME\DATABASE directory and are named PWDSID.ORA, where SID identifies the Oracle8 database instance. Password files can be used for local or remote connections to an Oracle8 database. The example below describes how to perform a local connection.

To create a password file:

  1. Create a password file with ORAPWD80:

    C:\> ORAPWD80 FILE=PWDSID.ORA PASSWORD=PASSWORD ENTRIES=MAX_USERS
    

    The essential elements of a password file are:

    Element   Description  

    FILE  

    Specifies the password file name.  

    PASSWORD  

    Sets the password for the INTERNAL and SYS accounts.  

    ENTRIES  

    Sets the maximum number of entries in the password file. This corresponds to the maximum number of distinct users allowed to connect to the database with the SYSDBA and SYSOPER DBA privileges simultaneously.  

  1. Set the INITSID.ORA file parameter REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE or SHARED. Definitions for all possible values are described below:

    Element   Description  

    EXCLUSIVE  

    Specifies that only one instance can use the password file and that the password file contains names other than SYS and INTERNAL. Oracle8 looks in the registry for the value of the ORA_SID_PWFILE parameter. If a value is unspecified, it looks in the registry for the value of the ORA_PWFILE parameter, which points to a file containing the INTERNAL password as well as user names, passwords, and privileges. If that is not set, it uses the default of ORACLE_HOME\DATABASE\PWDSID.ORA.  

    SHARED  

    Specifies that multiple instances can use the password file (for example, a parallel server environment). However, the only users recognized by the password file are SYS and INTERNAL. You cannot log in with SYSOPER or SYSDBA privileges even if those privileges are granted in the password file. The SHARED value of this parameter affords backward compatibility with earlier releases. The Oracle8 database looks for the same files as it does when the value is EXCLUSIVE, but only the INTERNAL account is available for privileged access. This is the default value.  

    NONE  

    Specifies that the Oracle8 database ignores the password file and that privileged users are authenticated by the Windows NT operating system.  

  2. Start Server Manager:

    C:\> SVRMGR30
    

  3. Connect as INTERNAL:

    SVRMGR> CONNECT INTERNAL/PASSWORD
    

  4. Start the Oracle8 database:

    SVRMGR> STARTUP
    

  5. Grant appropriate privileges to each user who needs to perform database administration. For example:

    SVRMGR> GRANT SYSDBA TO SCOTT;
    

    If successful, the following message displays:

    Statement Processed.
    

    This adds SCOTT to the password file and enables SCOTT to connect to the database with SYSDBA privileges. Use Server Manager to add or delete user names, user passwords, and user privileges in password files.

  6. Connect to the Oracle8 database with DBA privileges for SCOTT:

    SVRMGR> CONNECT SCOTT/TIGER AS SYSDBA
    

    You are connected to the Oracle8 database.


    Caution:

    Copying or manually moving password files may result in ORADIM80 not being able to find a password to start an instance.

     

    The password file is automatically hidden. This table describes how to see the password file:

    To...   Enter...  

    See the password file  

    C:\ORANT\DATABASE> ATTRIB
    

    The password file displays:

    A   H      C:\ORANT\DATABASE\PWDSID.ORA
    
     

    Make the password file visible  

    C:\ORANT\DATABASE> ATTRIB -H PWDSID.ORA
    

    Note: The password file must be visible before you can move or copy it.  

    Hide the password file again  

    C:\ORANT\DATABASE> ATTRIB +H PWDSID.ORA
    
     

Connecting as INTERNAL with a Password File

You can connect as INTERNAL with a password file. The password for INTERNAL is ORACLE if you installed Oracle8 Enterprise Edition through the Oracle8 Enterprise Edition option. If you installed Oracle8 Enterprise Edition through the Custom installation option, the password for INTERNAL is whatever you entered when prompted during installation.

To connect as INTERNAL with a password file:

  1. Follow the procedures in "Creating Password Files" to create a password file with ORAPWD80.

  1. Set the INITSID.ORA file parameter REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE or SHARED.


    Note:

    When REMOTE_LOGIN_PASSWORDFILE is set to NONE, connecting remotely to a database as INTERNAL is prohibited even if the correct password is supplied.  


  2. Connect to your Oracle8 database as follows:

    SVRMGR> CONNECT INTERNAL/PASSWORD
    

    where PASSWORD is the password created with ORAPWD80 or ORADIM80.

Changing the INTERNAL Password

Change the INTERNAL user account password with either ORADIM80 or ORAPWD80.

To change the password with ORADIM80:

  1. Delete the SID for the password you want to change:

    C:\> ORADIM80 -DELETE -SID SID 
    

    where SID is the SID to delete.

  1. Create the same SID again and specify a new INTERNAL password:

    C:\> ORADIM80 -NEW -SID SID -INTPWD NEW_PASSWORD - MAXUSERS N
    

    where SID is the same SID to recreate, NEW_PASSWORD is the new INTERNAL password, and N is the maximum number of DBAs/operators who can be logged in at once with this password.

To change the password with ORAPWD80:

  1. See Chapter 1, "The Oracle Database Administrator" in Oracle8 Administrator's Guide for specific instructions on using the ORAPWD80 Password Utility.

Encrypting Database Passwords

With the Oracle8 database, you can encrypt the password used to verify a remote database connection.

To enable password encryption:

  1. Add DBLINK_ENCRYPT_LOGIN to the initialization parameter INITSID.ORA file on the server computer.

  1. Set DBLINK_ENCRYPT_LOGIN equal to TRUE.

  2. Set the ORA_ENCRYPT_LOGIN configuration variable on the client computer to TRUE. See Appendix C, "Configuration Parameters and the Registry" for instructions on adding and setting configuration parameters in the registry.

Once these parameters are set to TRUE, whenever a user attempts a remote login, the Oracle8 database encrypts the password before sending it to the remote database. If the connection fails, the failure is noted in the audit log. The Oracle8 database then checks if either of these parameters is set to FALSE. If so, the Oracle8 database attempts the connection again using an unencrypted version of the password. If the connection is successful, the success is noted in the audit log, and the connection proceeds.


Note:

Releases prior to release 7.1 do not support encrypted passwords. If you are connecting to an earlier version of the Oracle database, you must set the initialization parameter DBLINK_ENCRYPT_LOGIN to FALSE for the connection to succeed.  


Downloading Patches from Oracle Worldwide Customer Support

Oracle Patch Assistant enables you to quickly and easily download patches for your Oracle products on Windows NT and Windows 95 through the World Wide Web. Two types of patches are available for download and installation:

Note that these registry keys are used by Oracle Patch Assistant to start a browser:, and to view proxy information.

Registry Key   Browser  

HKEY_CLASSES_ROOT\HTTP\SHELL\OPEN\COMMAND\DDEXEC\APPLICATION  

Your default browser  

HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\ INTERNET SETTINGS  

Internet Explorer  

HKEY_LOCAL_MACHINE\Software\Netscape\NetscapeNavigator\Users\username\DirRot

where username is the logon account name that is currently running the program.  

Netscape 4.0  

HKEY_CURRENT_USER\SOFTWARE\NETSCAPE\NETSCAPE NAVIGATOR\PROXY INFORMATION  

Netscape (below 4.0)  

To download and install a patch using Oracle Patch Assistant:

  1. Ensure you have a Java-enabled browser on your system. If you do not have such a browser, you can download one from either of these sites:

    • Netscape Navigator Version 3.0 or later

      Visit http://www.netscape.com

    • Microsoft Internet Explorer Version 3.0 or later

      Visit http://www.microsoft.com

    Oracle Patch Assistant can only work with a Java-enabled browser.

  2. Choose Start > Programs > Oracle for Windows NT - [HOME_NAME] > Oracle Patch Assistant.

    The Oracle Patch Assistant welcome window appears:

  1. Respond to instructions on each Oracle Patch Assistant window, and click Next when you are ready to continue to the next window. When you get to the last window, click Finish to complete the downloading and installation of patches. More documentation on this product is included with the online help.

Using the ORADEBUG Utility

The ORADEBUG utility is a debugging tool that sends debug commands through Server Manager to Oracle processes. It is primarily for use by developers and Oracle Worldwide Customer Support personnel. Only use this utility when instructed to do so by Oracle Worldwide Customer Support. Note that you must have database administrator privileges to use ORADEBUG.

To start ORADEBUG:

  1. Start Server Manager from the MS-DOS command prompt and connect to the database as INTERNAL. For example:

    C:\> SVRMGR30
    SVRMGR> CONNECT INTERNAL/PASSWORD

  1. Enter the following at the Server Manager prompt:

    SVRMGR> ORADEBUG
    

    ORADEBUG runs and prompts you for parameters. To obtain a list of these parameters, enter the following at the Server Manager prompt:

    SVRMGR> ORADEBUG HELP
    

    The output from most debug commands is written to a trace file. Trace files are created in the directory specified by the INITSID.ORA initialization parameters BACKGROUND_DUMP_DEST and USER_DUMP_DEST. By default, these parameters are set to ORACLE_HOME\RDBMS80\TRACE. If you want to find the location of your trace file, enter the following at the Server Manager prompt:

    SVRMGR> ORADEBUG TRACEFILE_NAME
    

    If the output from a debug command produces more than one line of output, the result is sent to a trace file, and a message indicating that the command has completed is relayed to Server Manager. If the output from a debug command produces only one line of output, the output is relayed directly to Server Manager.


    Note:

    There is currently a limitation when using ORADEBUG that can cause Server Manager to hang if you attempt to debug a thread that is blocking on input/output (I/O) until that I/O completes.

     




Prev

Next
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index