Chapter 3 Installing and Managing Oracle
Administrator Authentication Methods
You can allow administrators to connect to the database by using
operating system authentication or password file authentication. For remote
or local database administration, you can use either method, but you can use
the operating system authentication method with remote administration
only if you have a secured network connection.
? OSDBA and OSOPER are not Oracle privileges or roles that you grant
through the Oracle database. The operating system manages them. When
you connect to the database by using the OSOPER privilege (or SYSOPER
privilege), you can perform STARTUP, SHUTDOWN, ALTER DATABASE [OPEN/
MOUNT], ALTER DATABASE BACKUP, ARCHIVE LOG, and RECOVER, and
SYSOPER includes the RESTRICTED SESSION privilege. When you connect to
the database by using the OSDBA privilege (or SYSDBA privilege), you have all
system privileges with ADMIN OPTION, the OSOPER role, CREATE DATABASE,
and time-based recovery.
?
To use operating system authentication, set the REMOTE_LOGIN_
PASSWORDFILE parameter to NONE, which is the default.
?
sqlplus /nolog
?
CONNECT / AS SYSDBA or CONNECT / AS SYSOPER.
?
?Password File Authenticationorapwd
Usage: orapwd file=<fname> password=<password>
entries=<users>
where
file - name of password file (mand),
password - password for SYS and INTERNAL (mand),
entries - maximum number of distinct DBAs and
OPERs (opt),
?
ALTER SYSTEM DISCONNECT SESSION '9,3' IMMEDIATE;ALTER SYSTEM KILL SESSION '9,3' IMMEDIATE?Shutting Down the Oracle Instance
There are three stages to shutting down a database. First, you close the database, then the instance
dismounts the database, and finally you shut down the instance.
?
?? When closing the database, Oracle writes the redo buffer to the redo log files and the changed data in the database buffer cache to the data files, and closes the data files and redo log files. The control file remains open, but the database is not available for normal operations. After closing the database,
the instance dismounts the database. The control file is closed at thistime. The memory allocated and the background processes still remain.The final stage is the instance shutdown. The SGA is removed from memory and the background processes are terminated when the instance is shut down.
?
You can shut down the database by using the SHUTDOWN command with
any of four options. SHUTDOWN NORMAL, SHUTDOWN IMMEDIATE,SHUTDOWN TRANSACTIONAL,SHUTDOWN ABORT
?
SHUTDOWN NORMAL (DEFAULT):
?
SHUTDOWN TRANSACTIONAL:
?
SHUTDOWN IMMEDIATE:
?
SHUTDOWN ABORT:
When the database is started up after a SHUTDOWN ABORT, Oracle has to roll back the uncommitted transactions by using the online redo log files.
?
Instance Messages and Instance AlertsOracle writes informational messages and alerts to different files depending on the type of message.You can specify the locations of this files in the initialization parameters.
BACKGROUND_DUMP_DEST? Location to write the debugging trace files generated by the background processes and the alert log file. For example:
background_dump_dest???? d:\Oracle\admin\OEMREP\bdump
?
USER_DUMP_DEST? Location to write the trace files generated by user sessions.The server process, on behalf of the user sessions, writes trace files if the session encounters a deadlock or encounters any internal errors. The user sessions can be traced. The trace files thus generated are also written
to this location.
user_dump_dest???????? d:\Oracle\admin\OEMREP\udump
?
CORE_DUMP_DEST Location to write core dump files, primarily used on Unix platforms. Core dumps are normally produced when the session or the instance terminates abnormally with errors. This parameter is not available on Windows platforms.
core_dump_dest?????? d:\Oracle\admin\OEMREP\cdump
?
All databases have an alert log file. An alert log file in the directory specified by BACKGROUND_DUMP_DEST
The alert log logs significant database events andmessages. The alert log stores information about block corruption errors,internal errors, and the non-default initialization parameters used at instance
start-up. The alert log also records information about database start-up, shutdown, archiving, recovery, tablespace modifications, rollback segment modifications, and data file modifications.
Its filename depends on the operating system. For Unix platforms, it takes the format alert_<SID>.log (SID is the instance name).
background_dump_dest???? d:\Oracle\admin\OEMREP\bdump
Maybe the alert log file is "d:\Oracle\admin\OEMREP\bdump\alert_oemrep.log".
You can delete the file even when the database is running.
?
?
Oracle Managed Files (OMF)In previous versions of the Oracle Server, maintaining the physical operating system files associated with logical database objects was problematic. Dropping a logical database object (such as a tablespace) did not delete the associated operating system file, and therefore an extra step was performed to manually delete the files formerly associated with database objects.
?
You can use two new initialization parameters to define the location of files in the operating system: DB_CREATE_FILE_DEST and DB_CREATE_ONLINE_LOG_DEST_n.
?
DB_CREATE_FILE_DEST specifies the default location for new datafiles. The actual operating system file is created with the prefix ora_ and a suffix of .dbf.
?
DB_CREATE_ONLINE_LOG_DEST_n specifies as many as five locations for online redo log files and control files. The online redo log files have a suffix of .log, and the control files have a suffix of .ctl.
?