Oracle8i Administrator's Guide Release 2 (8.1.6) for Windows NT A73008-01 |
|
This chapter describes how to administer Oracle8i for Windows NT.
Specific topics discussed are:
This section provides information on the following:
Oracle8i for Windows NT allows you to have multiple, active Oracle home directories on a single computer. Chapter 3, "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:
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. |
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:
Oracle services must be started for you to use the Oracle8i database and its products.
Start Oracle services in either of three ways:
You can start the Oracle8i database when you start OracleServiceSID. See "Starting and Shutting Down a Database Using Services", for information on registry parameters that enable you to do this.
Note:
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:
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 "Using ORADIM to Administer an Oracle Instance" for instructions on using ORADIM.
To start Oracle Services from the Oracle Administration Assistant for Windows NT:
where SID is a specific instance name, such as ORCL.
where SERVICE is a specific service name, such as OracleServiceORCL.
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 "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:
The Control Panel window appears.
The Services dialog box appears.
OracleHOME_NAMETNSListener is stopped.
OracleServiceSID is stopped.
To stop Oracle Services from the MS-DOS command prompt:
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:
where SID is a specific instance name, such as ORCL.
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 Oracle8i database is started.
To automatically start the Oracle8i database each time you restart:
The Control Panel window appears.
The Services dialog box appears.
The Service dialog box appears.
To automatically start Oracle Services from the Oracle Administration Assistant for Windows NT:
where SID is a specific instance name, such as ORCL.
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, "Oracle8i 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:
The Control Panel window appears.
The Services dialog box appears.
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:
If either is set to FALSE (the default setting), it is possible to shut down the database by stopping OracleServiceSID, but it's not recommended because it results in an abnomal shutdown of the database.
The exact location in which to set these parameters is determined by the number of Oracle home directories on your computer:
Additional Information:
See Appendix C, "Oracle8i 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 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:
where SID is a specific instance name, such as ORCL.
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
where SID is the name of the Oracle8i database instance.
C:\> SQLPLUS
SQL> CONNECT INTERNAL
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.
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:\> ORAPWD FILE=PWDSID.ORA PASSWORD=PASSWORD ENTRIES=MAX_USERS
The essential elements of a password file are:
C:\> SQLPLUS
SQL> CONNECT INTERNAL
SQL> STARTUP
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.
SQL> CONNECT SCOTT/TIGER AS SYSDBA
You are connected to the Oracle8i database.
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 |
|
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 your database through the Typical or Minimal installation types.
To connect as INTERNAL with a password file:
SQL> CONNECT INTERNAL/PASSWORD
where PASSWORD is the password created with ORAPWD or ORADIM.
When connecting to the starter database from a remote machine as SYS or INTERNAL, you must use a different password from the one described in Chapter 6 of the Oracle8i Installation Guide for Windows NT when logging on with SYSDBA privileges. This is because the password file enables database access in this situation and it requires the password ORACLE for this purpose.
Change the INTERNAL user account password with either ORADIM or ORAPWD.
To change the password with ORADIM:
C:\> ORADIM -DELETE -SID SID
where SID is the SID to delete.
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:
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.The following commands change the SYS password. The INTERNAL password must be changed by recreating the password file.
C:\> SQLPLUS
SQL> CONNECT SYS/password
SQL> ALTER USER SYS IDENTIFIED BY
NEW_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.
Although it is possible for Oracle to access database files on remote computers using Universal Naming Convention (UNC), it is not recommended or supported because of performance and network reliability concerns.
UNC is a PC format for specifying the location of resources on a local area network. UNC uses the following format:
\\server-name\shared-resource-pathname
For example, to access the file SYSTEM01.DBF in the directory C:\ORACLE\ORA81\ORADATA\ORCL on the shared server ARGON, you reference the file as:
\\ARGON\ORACLE\ORA81\ORADATA\ORCL\SYSTEM01.DBF
Note that the location of archive log files cannot be specified using UNC. If you set the LOG_ARCHIVE_DEST_n initialization parameter to a UNC specification, the database does not start and you receive the following errors:
ORA-00256: error occurred in translating archive text string '\meldell\rmdrive' ORA-09291: sksachk: invalid device specified for archive destination OSD-04018: Unable to access the specified directory or device O/S-Error: (OS 2) The system cannot find the file specified
Ensure that you set the LOG_ARCHIVE_DEST_n initialization parameter to a mapped drive.
Your Oracle8i database is created in NOARCHIVELOG mode if you installed your database through the Typical or Minimal installation. If you created your databas through the Custom option of Database Configuration Assistant, you had the choice of either ARCHIVELOG or NOARCHIVELOG.
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:
C:\> SQLPLUS
SQL> CONNECT INTERNAL
SQL> SHUTDOWN
SQL> STARTUP MOUNT
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
SQL> ALTER DATABASE ARCHIVELOG;
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
SQL> ALTER DATABASE OPEN;
To enable automatic archiving:
# LOG_ARCHIVE_START = TRUE # LOG_ARCHIVE_DEST_1 = %ORACLE_HOME%\DATABASE\ARCHIVE # LOG_ARCHIVE_FORMAT = "%%ORACLE_SID%%T%TS%S.ARC"
SQL> SHUTDOWN
SQL> STARTUP
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
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
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.
|
![]() Copyright © 2000 Oracle Corporation. All Rights Reserved. |
|