Oracle8i Enterprise Edition for Windows NT Getting Started
Release 8.1.5 for Windows NT

A68694-01


Library

Product

Contents

Index

PrevNext

9
Administering a Database

This chapter describes how to administer Oracle8i Enterprise Edition.

Specific topics discussed are:

Managing Oracle Services

This section provides information on the following:

Oracle Service Naming Conventions for Multiple Oracle Homes

Oracle8i Enterprise Edition allows you to have multiple, active Oracle home directories on a single computer. Chapter 4, "Multiple Oracle Homes and Optimal Flexible Architecture" describes this feature. Multiple Oracle homes affect the naming conventions for Oracle services. As you perform installations into Oracle home directories:

This affects service names. This table describes how two service names, OracleTNSListener and OracleServiceSID, are affected when you install three Oracle8i 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. 

Required; for this example, HOME1 is accepted when prompted during installation 

ORCL 

OracleHOME1TNSListener OracleServiceORCL 

Second Oracle home installation on a computer. 

Required; for this example, HOME2 is accepted when prompted during installation. 

ORCL0 

OracleHOME2TNSListener OracleServiceORCL0 

Third Oracle home installation on a computer. 

Required; for this example, HOME3 is accepted when prompted during installation. 

ORCL1 

OracleHOME3TNSListener OracleServiceORCL1 

These two figures show how the Services dialog box appears with two Oracle8i databases 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 two 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 64 alphanumeric characters in length. 

For example, if the SID for the Oracle8i database is ORCL0, it is appended to the service OracleService. The instance name is the same as the value of the ORACLE_SID registry configuration parameter. 

OracleHOME_NAMETNSListener 

Listens for and accepts incoming connection requests from client applications. Automatically starts when the Windows NT computer restarts. The HOME_NAME that displays in this service name is the value you entered in the Name field on the File Locations dialog box of Oracle Universal Installer. 

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

Service Name Description

OracleHOME_NAMEAgent 

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

OracleHOME_NAMEConTextService 

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. 

OracleHOME_NAMEExtprocAgent 

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

OracleWebAssistant01

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

OracleMTSService01

Provides the COM communication interface between Microsoft Transaction Server (and its MS DTC component) and the Oracle8i database. 

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 OracleWebAssistant1, OracleWebAssistant2, OracleMTSService1, OracleMTSService2, and so on for this service.

Services for network products are also available. See Net8 Administrator's Guide for information on Oracle network services.

Starting Oracle Services

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

Start Oracle services in either of three 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.
  1. 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.
  2. Click Close to exit the Services dialog box.

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:
  2. C:\> NET START SERVICE
where SERVICE is a specific service name, such as OracleServiceORCL.

If you cannot find OracleServiceSID in the list, use ORADIM to create it. See Chapter 8, "Creating a Database" for instructions on using ORADIM.

To start Oracle Services from the Oracle Administration Assistant for Windows NT:

  1. Choose Start > Programs > Oracle - HOME_NAME > Enterprise Management > Database Administration Applications > Oracle Administration Assistant for Windows NT.
  1. Right-click the SID.
where SID is a specific instance name, such as ORCL.
  1. Choose Start Service
where SERVICE is a specific service name, such as OracleServiceORCL.

Stopping Oracle Services

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

To stop Oracle8i 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.
  1. Select OracleHOME_NAMETNSListener and choose Stop.
OracleHOME_NAMETNSListener is stopped.
  1. Select OracleServiceSID and choose Stop.
  2. Click OK.
OracleServiceSID is 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:
  2. C:\> NET STOP SERVICE
where SERVICE is a specific service name, such as OracleServiceORCL.

To stop Oracle Services from the Oracle Administration Assistant for Windows NT:

  1. Choose Start > Programs > Oracle - HOME_NAME > Enterprise Management > Database Administration Applications > Oracle Administration Assistant for Windows NT.
  1. Right-click the SID
where SID is a specific instance name, such as ORCL.
  1. Choose 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 Oracle8i database is started.

To automatically start the Oracle8i 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.
  1. Select the service OracleServiceSID and choose the Startup button.
The Service dialog box appears.
  1. Choose Automatic from the Startup Type field.
  2. Click OK.
  3. Click Close to exit the Services dialog box.

  4.  

To automatically start Oracle Services from the Oracle Administration Assistant for Windows NT:

  1. Choose Start > Programs > Oracle - HOME_NAME > Enterprise Management > Database Administration Applications > Oracle Administration Assistant for Windows NT.
  1. Right-click the SID
where SID is a specific instance name, such as ORCL.
  1. Choose Startup/Shutdown Options...
  2. Click the Oracle NT Service tab.
  3. In the Oracle NT Service Startup Type box click Automatic.


Starting and Shutting Down a Database with SQL*Plus

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


Note::

The directory path examples in this chapter follow Optimal Flexible Architecture (OFA) guidelines (for example, ORACLE_BASE\ORACLE_HOME\RDBMS\ADMIN). If you specified non-OFA compliant directories during installation, your directory paths will differ. See section "OFA and Multiple Oracle Home Configurations" for information. 


To start or shut down an Oracle8i database:

  1. Go to your Oracle8i database server.

  2.  
  1. Start SQL*Plus at the MS-DOS command prompt:
  2. C:\> SQLPLUS
  3. Connect to the Oracle8i database with the INTERNAL user name:
  4. SQL> CONNECT INTERNAL
  5. Follow the instructions below:

  6.  

     


    If You Want to... Then Enter...

    Start a database with the default parameter file 

    SQL> STARTUP 

    This command uses the default INIT.ORA file located in the ORACLE_BASE\ ADMIN\DB_NAME\PFILE directory. 

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

    SQL> STARTUP PFILE=PATH\FILENAME

    This command uses the INIT.ORA file specified in PATH\FILENAME. This example starts the database using a file named INIT2.ORA in C:\ORA81\ADMIN\ORCL\ PFILE

     

    SQL> STARTUP PFILE=C:\ORA81\ADMIN\ORCL\PFILE\INIT2.ORA

    Stop the database 

    SQL> 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" for a list of other tools that can start the database and the Oracle8i Administrator's Guide for information on options you can specify when starting your database. 


Starting and Shutting Down a Database Using Services

You can start or shut down the Oracle8i database by starting or stopping the service OracleServiceSID in the Control Panel. This automated procedure is equivalent to manually entering the following:
If You... These Commands are Performed...

Start OracleServiceSID

C:\> ORADIM - STARTUP -SID SID -USERPWD PASSWORD -STARTTYPE SRV,INST 

Stop OracleServiceSID

C:\> ORADIM - SHUTDOWN -SID SID -USERPWD PASSWORD -SHUTTYPE SRV,INST -SHUTMODE -I 

To start the database by starting OracleServiceSID:

  1. Review or set the following registry parameters. Note that ORADIM, when used to create or edit instances, automatically sets these values in the registry.

  2.  

     


    Parameter When Set to TRUE, this Parameter...

    ORA_SID_AUTOSTART 

    When set to TRUE (the default value), starts the database when OracleServiceSID is started. 

    ORA_SID_PFILE 

    Sets the full path to the INIT.ORA parameter file. The default path is ORACLE_BASE\ADMIN\DB_NAME\PFILE\INIT.ORA. 

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

The exact location in which to set these parameters is determined by the number of Oracle home directories on your computer:
If You Have... Then Add These Parameters in...

One home directory 

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 

Additional directories 

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID

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

  1. Choose Start > Settings > Control Panel.
The Control Panel window appears.
  1. Double-click Services.
The Services dialog box appears.
  1. Select OracleServiceSID and choose Start.

  2.  
This automatically starts ORADIM and issues the -STARTUP command using the initialization parameter file identified by ORA_SID_PFILE.

To shut down the database by stopping OracleServiceSID:

  1. Set either of the following parameters to TRUE in the registry:

  2. Parameter When Set to TRUE, this Parameter...

    ORA_SHUTDOWN 

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

    ORA_SID_SHUTDOWN 

    Shuts down the Oracle8i database identified by the SID value. 

If either is set to FALSE (the default setting), you cannot shut down the database by stopping OracleServiceSID.


The exact location in which to set 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\HOME0 

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, "Oracle 8i Configuration Parameters and the Registry" for instructions on adding and editing registry parameters.

  1. Set the following optional parameters to appropriate values in the registry:

  2. Parameter Description

    ORA_SID_SHUTDOWNTYPE 

    Set to A (abort), I (immediate), or N (normal) to indicate the database shutdown mode. The default mode is I (immediate) if you do not set this parameter. 

    ORA_SID_SHUTDOWN_TIMEOUT 

    Sets the maximum time to wait before the service for a particular SID stops. 

  3. Choose Start > Settings > Control Panel.
The Control Panel window appears.
  1. Double-click Services.
The Services dialog box appears.
  1. Select OracleServiceSID and choose Stop.
This automatically starts ORADIM, which issues the -SHUTDOWN command in the mode indicated by ORA_SID_SHUTDOWNTYPE, and shuts down your Oracle8i database.

To start or stop a Database using Oracle Services from the Oracle Administration Assistant for Windows NT:

  1. Choose Start > Programs > Oracle - HOME_NAME > Enterprise Management > Database Administration Applications > Oracle Administration Assistant for Windows NT.
  1. Right-click the SID
where SID is a specific instance name, such as ORCL.
  1. Choose Startup/Shutdown Options...
  2. Click the Oracle Instance tab.
  3. Select Start up instance when service is started or select Shut down instance when service is stopped.


To view information on Process Information from the Oracle Administration Assistant for Windows NT:

  1. Choose Start > Programs > Oracle - HOME_NAME > Enterprise Management > Database Administration Applications > Oracle Administration Assistant for Windows NT.
  1. Right-click the SID
where SID is a specific instance name, such as ORCL.
  1. Choose Process Information...
Information on Oracle threads is displayed.




Note :

In order to use the Process Information feature in the Oracle Administration Assistant, Windows NT native authentication needs to be enabled. To enable Windows NT native authentication set SQLNET.AUTHENTICATION_SERVICES = (NTS) in the sqlnet.ora file and restart the Oracle database. 


Running Multiple Instances

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

To run multiple instances:

  1. Ensure that you have already created each instance.
  1. Ensure that you started the services for each instance using ORADIM or the Services dialog box of the Windows NT Control Panel.
  2. Set the ORACLE_SID configuration parameter at the MS-DOS command prompt to the SID for each instance you want to run:
  3. C:\> SET ORACLE_SID=SID
where SID is the name of the Oracle8i database instance.
  1. Start SQL*Plus:
  2. C:\> SQLPLUS
  3. Connect as INTERNAL:
  4. SQL> CONNECT INTERNAL
  5. Start up the database with the new instance:
  6. SQL> STARTUP PFILE=ORACLE_BASE\ADMIN\DB_NAME\PFILE\INIT.ORA
where ORACLE_BASE is C:\ORACLE by default (unless you changed it during installation) and DB_NAME is the name of the instance.

Creating Password Files

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

To create a password file:

  1. Create a password file with ORAPWD:
  2. C:\> ORAPWD FILE=PWDSID.ORA PASSWORD=PASSWORD ENTRIES=MAX_USERS
The essential elements of a password file are:



Element Description

SID 

Identifies the database instance. 

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 INIT.ORA file parameter REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE or SHARED. Definitions for all possible values are described below:

  2.  

     


    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. Oracle8i 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_BASE\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 Oracle8i 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 Oracle8i database ignores the password file and that privileged users are authenticated by the Windows NT operating system. NONE is the default setting. 

  3. Start SQL*Plus:
  4. C:\> SQLPLUS
  5. Connect as INTERNAL:
  6. SQL> CONNECT INTERNAL
  7. Start the Oracle8i database:
  8. SQL> STARTUP
  9. Grant appropriate privileges to each user who needs to perform database administration. For example:
  10. SQL> 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 SQL*Plus to add or delete user names, user passwords, and user privileges in password files.

  1. Connect to the Oracle8i database with DBA privileges for SCOTT:
  2. SQL> CONNECT SCOTT/TIGER AS SYSDBA
You are connected to the Oracle8i database.



Caution:

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


Viewing Password Files

The password file is automatically hidden. This section describes two ways of viewing the password file:

To see the password file from the MS-DOS command prompt:

To... Enter...

See the password file 

C:\ORACLE\ORA81\DATABASE> ATTRIB

The password file displays:

A H C:\ORACLE\ORA81\DATABASE\PWDSID.ORA

Make the password file visible 

C:\ORACLE\ORA81\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:\ORACLE\ORA81\DATABASE> ATTRIB +H PWDSID.ORA

To see the password file from Windows NT Explorer:

  1. Open Windows NT Explorer.
  1. Open the folder to view.
  2. Click Folder Options from the View main menu.
  3. Click the View tab.
  4. Follow the instructions below:
  5. To... Click...

    See the password file 

    Show all files. 

    Hide the password file 

    Do not show hidden files.

Deleting Password Files

This section describes how to delete a password file.

To delete a password file:

  1. Make the password file visible at the MS-DOS command prompt or in Windows NT Explorer by following the instructions in section "Viewing Password Files".
  1. Delete the password file based on whether you made it visible at the MS-DOS command prompt or in Windows NT Explorer.

  2.  

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 Oracle8i Enterprise Edition through the Oracle8i Enterprise Edition option. If you installed Oracle8i 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 ORAPWD.
  1. Set the INIT.ORA file parameter REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE or SHARED.

  2.  

     
     
     
     
     


    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. 


  3. Connect to your Oracle8i database as follows:
  4. SQL> CONNECT INTERNAL/PASSWORD
where PASSWORD is the password created with ORAPWD or ORADIM.

Changing the INTERNAL Password

Change the INTERNAL user account password with either ORADIM or ORAPWD.

To change the password with ORADIM:

  1. Delete the SID for the password you want to change:
  2. C:\> ORADIM -DELETE -SID SID
where SID is the SID to delete.
  1. Create the same SID again and specify a new INTERNAL password:
  2. C:\> ORADIM -NEW -SID SID -INTPWD NEW_PASSWORD - STARTMODE AUTO - MAXUSERS N 
    -PFILE <drive: \path\init{sid}.ora>
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 ORAPWD:

  1. See section "Deleting Password Files" for instructions on deleting the password file.
  1. See section "Creating Password Files" for instructions on creating a password file.

  2.  

To change the password with SQL*Plus:

The section assumes the password file is already created and the INIT.ORA file parameter REMOTE_LOGIN_PASSWORDFILE is set to SHARED or EXCLUSIVE.

  1. Start SQL*Plus:
  2. C:\> SQLPLUS
  1. Connect with the INTERNAL user name:
  2. SQL> CONNECT INTERNAL
  3. Change the password for the SYS user name, for which INTERNAL is an alias:
  4. SQL> ALTER USER SYS IDENTIFIED BY PASSWORD;
This also changes the INTERNAL password.

Encrypting Database Passwords

With the Oracle8i 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 INIT.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, "Oracle 8i 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 Oracle8i database encrypts the password before sending it to the remote database. If the connection fails, the failure is noted in the audit log. The Oracle8i database then checks if either of these parameters is set to FALSE. If so, the Oracle8i 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. 


Archiving Redo Log Files

Your Oracle8i database is created in either ARCHIVELOG or NOARCHIVELOG mode. See the table in section "Starter and Custom Database Overview" for the archiving mode in which your database is created.

In NOARCHIVELOG mode, redo logs are not archived. This protects the database from instance failure, but not from disk failure. Setting your archive mode to ARCHIVELOG and enabling automatic archiving causes redo log files to be archived. This protects the database from both instance and disk failure.

This section describes how to change the archive mode to ARCHIVELOG and enable automatic archiving. See the chapter "Archiving Redo Information" of the Oracle8i Administrator's Guide for complete descriptions of the ARCHIVELOG and NOARCHIVELOG modes.

Step 1: Change the Archive Mode to ARCHIVELOG

To change the archive mode to ARCHIVELOG:

  1. Start SQL*Plus at the MS-DOS command prompt:
  2. C:\> SQLPLUS
  1. Connect to the Oracle8i database with the INTERNAL user name:
  2. SQL> CONNECT INTERNAL
  3. If the database is open, shut it down:
  4. SQL> SHUTDOWN
  5. Mount the database:
  6. SQL> STARTUP MOUNT
  7. Enter the following command:
  8. SQL> ARCHIVE LOG LIST
The following output indicates the database is not in archive mode:
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            %RDBMS%\
Oldest online log sequence     34
Current log sequence           37
  1. Change the archive mode to ARCHIVELOG:
  2. SQL> ALTER DATABASE ARCHIVELOG;
  3. Enter the following command:
  4. SQL> ARCHIVE LOG LIST
The following output indicates the database is now in archive mode:
Database log mode              Archive Mode
Automatic archival             Disabled
Archive destination            %RDBMS%\
Oldest online log sequence     34
Current log sequence           37
  1. Open the database:
  2. SQL> ALTER DATABASE OPEN;
  3. Continue to "Step 2: Enable Automatic Archiving".

  4.  

Step 2: Enable Automatic Archiving

To enable automatic archiving:

  1. Open the ORACLE_BASE\ADMIN\DB_NAME\INIT.ORA file.
  1. Find the following three parameters:
  2. # LOG_ARCHIVE_START = TRUE
    # LOG_ARCHIVE_DEST = %ORACLE_HOME%\DATABASE\ARCHIVE
    # LOG_ARCHIVE_FORMAT = "%%ORACLE_SID%%T%TS%S.ARC"
  3. Remove the # sign from in front of each.

  4.  

    Note:

    The double quotes around LOG_ARCHIVE_FORMAT do not need to be removed. 


  5. Edit the LOG_ARCHIVE_DEST value to identify an existing drive and directory in which to archive your filled redo logs.
  6. Edit the LOG_ARCHIVE_FORMAT value to indicate the appropriate archiving format:

  7. Format Description Example

    %%ORACLE_SID%%%T.ARC 

    Specifies the thread number. This number is padded to the left by zeroes. The default value is one with a range of up to three characters. 

    SID0001.ARC 

    %%ORACLE_SID%%%S.ARC 

    Specifies the log sequence number. This number is padded to the left by zeroes. The default value is one with a range of up to five characters. 

    SID0001.ARC 

    %%ORACLE_SID%%%t.ARC 

    Specifies the thread number. The number is not padded. The default value is one with no range limit on characters. 

    SID1.ARC 

    %%ORACLE_SID%%%sARC 

    Specifies the log sequence number. The number is not padded. The default value is one with no range limit on characters. 

    SID1.ARC 

  8. Save your changes.
  9. Exit the file.
  10. Shut down the database:
  11. SQL> SHUTDOWN
  12. Restart the database
  13. SQL> STARTUP
  14. Enter the following command:
  15. SQL> ARCHIVE LOG LIST
The following output indicates that automatic archiving of redo log files is enabled and an archiving destination is specified:
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            C:\BACKUP
Oldest online log sequence     34
Current log sequence           37

Using the ORADEBUG Utility

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

To start ORADEBUG:

  1. Start SQL*Plus from the MS-DOS command prompt and connect to the database as INTERNAL. For example:
  2. C:\> SQLPLUS
    
    SQL> CONNECT INTERNAL
  1. Enter the following at the SQL*Plus prompt:
  2. SQL> ORADEBUG
ORADEBUG runs and prompts you for parameters. To obtain a list of these parameters, enter the following at the SQL*Plus prompt:
SQL> ORADEBUG HELP

The output from most debug commands is written to a trace file. Trace files are created in the directory specified by the INIT.ORA initialization parameters BACKGROUND_DUMP_DEST and USER_DUMP_DEST. By default, these parameters are set to ORACLE_BASE\ADMIN\DB_NAME\BDUMP and ORACLE_BASE\ADMIN\DB_NAME\UDUMP, respectively. If you want to find the location of your trace file, enter the following at the SQL*Plus prompt:

SQL> 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 SQL*Plus. If the output from a debug command produces only one line of output, the output is relayed directly to SQL*Plus.


Note:

There is currently a limitation when using ORADEBUG that can cause SQL*Plus 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 © 1999 Oracle Corporation.
All Rights Reserved.

Library

Product

Contents

Index