Oracle8
Enterprise Edition Getting Started
Release 8.0.5 for Windows NT A64416-01 |
|
This chapter describes how to administer Oracle8 Enterprise
Edition.
Specific topics discussed are:
This section provides information on the following:
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:
These two figures show how the Services dialog box
appears with two Oracle8 databases on a single computer:
.
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: 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 Appendix 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 Net8
Getting Started for Windows NT and Windows 95/98
for information on Oracle network 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:
The Control Panel window appears.
The Services dialog box appears.
To start Oracle Services from the MS-DOS command prompt:
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 9, "Creating a Database"
for instructions on using ORADIM80.
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:
The Control Panel window appears.
The Services dialog box appears.
The Stopping dialog box informs you that OracleStartSID
will also be stopped.
Both OracleServiceSID and OracleStartSID are stopped.
To stop Oracle Services from the MS-DOS command prompt:
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.
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:
The Control Panel window appears.
The Services dialog box appears.
The Service dialog box appears.
These instructions assume that a database instance is created
and the services are started.
To start or shut down an Oracle8 database:
C:\> SVRMGR30
SVRMGR> CONNECT INTERNAL/PASSWORD
SVRMGR> EXIT
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. |
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 and Instance Manager. You can also use SQL Worksheet.
See the 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:
The Repository Login Information dialog box appears:
The Oracle Enterprise Manager Console appears. The Navigator Window displays in the upper-left portion of the console.
The list of databases in your Oracle Enterprise Manager network appears.
The Login Information dialog box appears.
The Oracle Instance Manager window appears.
The initialization parameters appear for the Oracle8 database that you want to start or shut down.
The Save Configuration dialog box appears.
This action stores the initialization parameter information for the managed Oracle8 database in the repository.
You are returned to the Oracle Enterprise Manager Console.
A menu appears with options for starting or shutting down the database:
The Login Information dialog box appears.
You are returned to the same menu with options for starting and shutting down the database.
If You Want to... | Then... |
---|---|
Start the database |
|
|
|
|
|
|
|
Shut down the database |
|
|
|
|
|
|
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 manually set either of two
registry parameter values to TRUE in the registry:
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:
To immediately shut down the database by stopping OracleServiceSID:
See Appendix C, "Configuration Parameters and the Registry" for instructions on adding and editing registry parameters.
The Control Panel window appears.
The Services dialog box appears.
This automatically starts Server Manager, issues the SHUTDOWN IMMEDIATE command, and shuts down your Oracle8 database.
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:
C:\> SET ORACLE_SID=SID
where SID is the name of the Oracle8 database instance.
C:\> SVRMGR30
SVRMGR> CONNECT INTERNAL/PASSWORD
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.
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:
C:\> ORAPWD80 FILE=PWDSID.ORA PASSWORD=PASSWORD ENTRIES=MAX_USERS
The essential elements of a password file are:
C:\> SVRMGR30
SVRMGR> CONNECT INTERNAL/PASSWORD
SVRMGR> STARTUP
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.
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:
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:
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. |
C:\> SVRMGR30
SVRMGR> CONNECT INTERNAL/PASSWORD
where PASSWORD is the password created with ORAPWD80 or ORADIM80.
Change the INTERNAL user account password with either ORADIM80
or ORAPWD80.
To change the password with ORADIM80:
C:\> ORADIM80 -DELETE -SID SID
where SID is the SID to delete.
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:
See the Oracle8 Administrator's
Guide for specific instructions
on using the ORAPWD80 Password Utility.
With the Oracle8 database, you can encrypt the password used
to verify a remote database connection.
To enable password encryption:
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.
When running Oracle Installer, there are two configuration
options for installing an Oracle8 database. This table describes the archiving
options provided with each option:
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 Oracle8 Administrator's Guide for complete descriptions
of the ARCHIVELOG and NOARCHIVELOG modes.
To change the archive mode to ARCHIVELOG:
C:\> SVRMGR30
SVRMGR> CONNECT INTERNAL/PASSWORD
SVRMGR> SHUTDOWN
SVRMGR> STARTUP MOUNT
SVRMGR> 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 %RDBMS80%\ Oldest online log sequence 34 Current log sequence 37
SVRMGR> ALTER DATABASE ARCHIVELOG;
SVRMGR> ARCHIVE LOG LIST
The following output indicates the database is now in archive mode:
Database log mode Archive Mode Automatic archival Disabled Archive destination %RDBMS80%\ Oldest online log sequence 34 Current log sequence 37
SVRMGR> ALTER DATABASE OPEN;
To enable automatic archiving:
# LOG_ARCHIVE_START = TRUE # LOG_ARCHIVE_DEST = %ORACLE_HOME%\DATABASE\ARCHIVE # LOG_ARCHIVE_FORMAT = "%%ORACLE_SID%%T%TS%S.ARC"
Note: The double quotes around LOG_ARCHIVE_FORMAT do not need to be removed. |
SVRMGR> SHUTDOWN
SVRMGR> STARTUP
SVRMGR> 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
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 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:
C:\> SVRMGR30 SVRMGR> CONNECT INTERNAL/PASSWORD
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. |