Professional Documents
Culture Documents
BS -IT (VII)
Submitted to : Mam Sumaira Irfan
One of a database administrator’s (DBA) major responsibilities is to ensure that the database is
available for use. The DBA can take precautions to minimize failure of the system. In spite of the
precautions, it is naive to think that failures will never occur. The DBA must make the database
operational as quickly as possible in case of a failure and minimize the loss of data. To protect
the data from the various types of failures that can occur, the DBA must back up the database
regularly. Without a current backup, it is impossible for the DBA to get the database up and
running if there is a file loss, without losing data. Backups are critical for recovering from
different types of failures. Making an assumption that a backup exists without actually checking
it’s existence can prove very costly if it is not valid.
Categories of Failures
Different types of failures may occur in an Oracle database environment. These include:
Each type of failure requires a varying level of involvement by the DBA to recover effectively
from the situation. In some cases, recovery depends on the type of backup strategy that has
been implemented. For example, a statement failure requires little DBA intervention, whereas a
media failure requires the DBA to employ a tested recovery strategy.
Statement Failure
Statement failure occurs where there is a logical failure in the handling of a statement in an
Oracle program. Types of statement failures include:
• The user attempts to enter invalid data into the table, perhaps violating integrity constraints.
• The user attempts an operation with insufficient privileges, such as an insert on a table using
only SELECT privileges.
• The user attempts to create a table but exceeds the user’s allotted quota limit.
• The user attempts an INSERT or UPDATE on a table, causing an extent to be allocated, but
insufficient free space is available in the tablespace.
When a statement failure is encountered, it is likely that the Oracle server or the operating
system will return an error code and a message. The failed SQL statement is automatically rolled
back, then control is returned to the user program. The application developer or DBA can use
the Oracle error codes to diagnose and help resolve the failure.
DBA intervention after statement failures will vary in degree, depending on the type of failure,
and may include the following:
• Fix the application so that logical flow is correct. Depending on your environment this may be
an application developer task rather than a DBA task.
• Modify the SQL statement and reissue it. This may also be an application developer task rather
than a DBA task.
• Provide the necessary database privileges for the user to complete the statement successfully.
• Add file space to the tablespace. Technically, the DBA should make sure this does not happen;
however, in some cases it may be necessary to add file space. A DBA can also use the RESIZE
and AUTOEXTEND options for data files.
User Process Failures
Causes of User Process Failures
A user’s process may fail for a number of reasons; however, the more common causes include:
• The user’s program raised an address exception, which terminated the session.
• PMON rolls back the transaction and releases any resources and locks being held by it.
User Process Failure and DBA Action
The DBA will rarely need to take action to resolve user process errors. The user process cannot
continue to work, although the Oracle server and other user processes will continue to function.
User Errors
DBA intervention is usually required to recover from user errors.
• The user commits data but discovers an error in the committed data.
SQL> COMMIT;
SQL> COMMIT;
LogMiner enables the analysis of the contents of archived redo logs. It can be used to provide a
historical view of the database without the need for point-in-time recovery. It can also be used
to undo operations, allowing repair of logical corruption.
point-in-time recovery enables you to quickly recover one or more tablespaces in an Oracle
database to an earlier time, without affecting the state of the rest of the tablespaces and other
objects in the database. Point-in-Time Recovery (PITR) allows a database administrator to restore
or recover a set of data from a backup from a particular time in the past, using a tool or a
system.
• The server becomes unavailable due to hardware problems such as a CPU failure, memory
corruption, or an operating system crash.
• One of the Oracle server background processes (DBWn, LGWR, PMON, SMON, CKPT)
experiences a failure.
• Starts the instance by using the “startup” command. The Oracle server will automatically
recover, performing both the roll forward and rollback phases.
• Investigates the cause of failure by reading the instance alert.log file and any other trace files
that were generated during the instance failure.
After the database has opened, notify users that any data that they did not commit must be
reentered.
Recovery from Instance Failure
• Notify users.
Media failure involves a physical problem when reading from or writing to a file that is necessary
for the database to operate. Media failure is the most serious type of failure because it usually
requires DBA intervention.
• The disk drive that held one of the database files experienced a head crash.
• There is a physical problem reading from or writing to the files needed for normal
database operation.
• A file was accidentally erased.
Media Failure Resolution
A tested recovery strategy is the key component to resolving media failure problems. The ability
of the DBA to minimize down time and data loss as a result of media failure depends on the
type of backups that are available. A recovery strategy, therefore, depends on the following:
• The backup method you choose, and which files are affected.
• The Archivelog mode of operation of the database. If archiving is used, you can apply archived
redo log files to recover committed data since the last backup.
Network Failure causes
Listener fails.
Network Interface Card (NIC) fails.
Network Connection fails.
Network Failure Resolution
………………………………………………………………………………………………………………………………………………………