Oracle8i
Enterprise Edition for Windows NT Getting Started
Release 8.1.5 for Windows NT A68694-01 |
|
This chapter describes how to administer Oracle8i
Enterprise Edition.
Specific topics discussed are:
This section provides information on the following:
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:
These two figures show how the Services dialog box
appears with two Oracle8i 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 two main Oracle services are:
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. |
Services for network products are also available. See Net8
Administrator's Guide for information on Oracle network services.
Oracle services must be started for you to use the Oracle8i
database and its products.
Start Oracle services in either of three ways:
Note: You can start the Oracle8i database when you start OracleServiceSID. See section "Starting and Shutting Down a Database Using Services" for information on registry parameters that enable you to do this. |
To start Oracle Services from the Control Panel:
To start Oracle Services from the MS-DOS command prompt:
C:\> NET START SERVICE
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:
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:
Note: You can stop the Oracle8i database in normal, immediate, or abort mode when you stop OracleServiceSID. See the section "Starting and Shutting Down a Database Using Services" for information on registry parameters that enable you to do this. |
To stop Oracle8i Services from the Control Panel:
To stop Oracle Services from the MS-DOS command prompt:
C:\> NET STOP SERVICE
To stop Oracle Services from the Oracle Administration Assistant for Windows NT:
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:
To automatically start Oracle Services from the Oracle Administration Assistant for Windows NT:
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:
C:\> SQLPLUS
SQL> CONNECT INTERNAL
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. |
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:
To start the database by starting OracleServiceSID:
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:
To 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:
See Appendix C, "Oracle 8i Configuration Parameters and the Registry" for instructions on adding and editing registry parameters.
To start or stop a Database using Oracle Services from the Oracle Administration Assistant for Windows NT:
To view information on Process Information from the Oracle Administration Assistant for Windows NT:
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:
C:\> SET ORACLE_SID=SID
C:\> SQLPLUS
SQL> CONNECT INTERNAL
SQL> STARTUP PFILE=ORACLE_BASE\ADMIN\DB_NAME\PFILE\INIT.ORA
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:
C:\> SQLPLUS
SQL> CONNECT INTERNAL
SQL> STARTUP
SQL> GRANT SYSDBA TO SCOTT;
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.
Caution: Copying or manually moving password files may result in ORADIM not being able to find a password to start an instance. |
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 see the password file from Windows NT Explorer:
To... | Click... |
See the password file |
Show all files. |
Hide the password file |
Do not show hidden files. |
This section describes how to delete a password file.
To delete 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:
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. |
SQL> CONNECT INTERNAL/PASSWORD
Change the INTERNAL user account password with either ORADIM
or ORAPWD.
To change the password with ORADIM:
C:\> ORADIM -NEW -SID SID -INTPWD NEW_PASSWORD - STARTMODE AUTO - MAXUSERS N -PFILE <drive: \path\init{sid}.ora>
To change the password with ORAPWD:
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.
SQL> CONNECT INTERNAL
SQL> ALTER USER SYS IDENTIFIED BY PASSWORD;
With the Oracle8i 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 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.
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.
To change the archive mode to ARCHIVELOG:
SQL> CONNECT INTERNAL
SQL> SHUTDOWN
SQL> STARTUP MOUNT
SQL> ARCHIVE LOG LIST
Database log mode No Archive Mode Automatic archival Disabled Archive destination %RDBMS%\ Oldest online log sequence 34 Current log sequence 37
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ARCHIVE LOG LIST
Database log mode Archive Mode Automatic archival Disabled Archive destination %RDBMS%\ Oldest online log sequence 34 Current log sequence 37
SQL> 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. |
SQL> SHUTDOWN
SQL> STARTUP
SQL> ARCHIVE LOG LIST
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 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:
C:\> SQLPLUS SQL> CONNECT INTERNAL
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. |