Академический Документы
Профессиональный Документы
Культура Документы
1.) Recovery Manager (RMAN): It is an Oracle utility that can backup, restore, and recover
database files. It is a feature of the Oracle database server and does not require separate
installation.
2.) User-Managed backup and recovery: We use operating system commands for backups and
SQL*Plus for recovery. This method is called user-managed backup and recovery and is fully
supported by Oracle, although use of RMAN is highly recommended because it is more robust
and greatly simplifies administration.
1.) Consistent Backup: This is also known as Cold Backup. A consistent backup is one in which
the files being backed up contain all changes up to the same system change number (SCN). This
means that the files in the backup contain all the data taken from a same point in time.
2.) Inconsistent Backup: This is also known as Hot Backup. An inconsistent backup is a backup
in which the files being backed up do not contain all the changes made at all the SCNs. This can
occur because the datafiles are being modified as backups are being taken.
There are some DBAs which prefer oracle user-managed backups. They put their database into
backup mode prior to backing up and take it out of backup mode after backup. If we’re going to
perform user-managed backups, we must back up all of the following file:
Datafiles
Control files
Online redo logs (if performing a cold backup)
The parameter file (not mandatory )
Archived redo logs
Password file if used
A hot backup requires quite a bit more work than cold backup. Below are steps required for hot
backup?
Step 1 : Check the log mode of the database Whenever we go for hot backup then the
database must be in archivelog mode .
Step 2 : Put the database into backup mode If we are using the oracle 10gR2 or later , then
we can put the entire database into backup mode and if we are using the oracle prior to 10gR2
,then we have to put each tablespace in backup mode . In my case , I am having 11gR2 .
Step 3 : Backup all the datafiles Copy all the datafile using the operating system command
and Paste it on the desired backup location .Meanwhile,we can verify the status of the datafile
by using the v$backup view to check the status of the datafiles.
The Column STATUS=ACTIVE shows that the datafiles are in backup mode .
Step 4 : Take out the database from backup mode If we are using 10gR2 or above version of
oracle , we use the below command to take out the database from backup mode as
Step 5 : Switch the redolog file and backup archivelogs After taking the database out of Hot
Backup we must switch logfile (preferably more than once) and backup the archivelogs
generated .We may backup archivelogs while the database is in backup mode but we must also
backup the first archivelog(s) after the end backup. The best method to do both is to run the
SQL command alter system archive log current. This switches the logfile but does not return the
prompt until the previous redo log has been archived. We can run alter system switch logfile,
but then we won't be sure that the latest redo log has been archived before we move on to the
next step.
Step 6 : Back up the control file Now , we can backup the controlfile as binary file and as
human readable .We should use both methods to back up the control file; either one may come
in handy at different times . The commands are as
(Human readable)
(Binary format)
SQL> alter database backup controlfile to '<backup location>' ;
Database altered.
Step 7 : Backup the passwordfile and spfile We can backup the passwordfile and spfile though
it is not mandatory.
We need to backup all the archived log files, these files are very important to do
recovery.
It is advisable to backup all of tablespaces (except read-only tablespaces), else complete
recovery is not possible.
Backup of online redo log files are not required, as the online log file has the end of
backup marker and would cause corruption if used in recovery.
It is Preferable to start the hot backups at low activity time.
When hot backups are in progress we "cannot" shutdown the database in NORMAL or
IMMEDIATE mode (and it is also not desirable to ABORT).