Professional Documents
Culture Documents
Data files
Password file
In order to perform database backup you need to have your database in ARCHIVE MODE.
To check if your database is in archive mode or not you need to fire the below sql
statement :
SELECT log_mode from V$DATABASE;
As you can see currently my database is NOT in archive mode. So let it first set it up in archive
mode.
Oracle allows you to have up to 10 destinations where you can have your Archive Log
created.
Either of the way you can mention the path of archive log to reside:
LOG_ARCHIVE_DEST_1='Location=/full/path/to/log/directory'
OR
LOG_ARCHIVE_DEST_2='Service=Standby'
2. Log_Archive_Format:
Log_Archive_Format='ARC%S_%R.%T'
%S = sequence number
%R= Incarnation of database like once you first setup your database then it is 1st
incarnation if you reset the log it going to be 2nd incarnation and so on
%T=Thread number used while archiving.
3. Log_Archive_Dest_State:
If you want to dynamically enable or disable your archive log destination then you
need to use this parameter which should be set either enable or disable.
LOG_ARCHIVE_DEST_STATE_1 =enable
4. Log_Archive_Start:
5. Log_Archive_Max_Processes:
6. Log_Archive_Min_Succeed_Dest:
This signifies min number of destination required in order to you database succeed.
Log_Archive_Min_Succeed_Dest =1
7. Log_Archive_Trace:
Default it is set to 0 which means , we are not tracing any archiving activity. Higher
the number higher tracing information.
The log_archive_dest
the one without number is the oldest version of oracle and is used for
backward compatibility.
Now after verifying the log_archive parameters, we are going to configure the acrhive mode to our
database. For that we need to do:
shutdown immediate;
If you have notice in our log_archive_dest_n parameter do not have any destination specified. So
now we need to set up the archive log path.
ALTER SYSTEM SET log_archive_dest_1='location= C:\oracle\product\10.2.0\admin\orcl\arch';
We will alter system and switch log file so that we can see if our archiving is happening properly or
not .
We must be using these archive logs to perform RECOVERY if anything goes wrong.
When we issue above "begin backup"command- oracle will perform a checkpoint to flush stuffs from
memory to the data files.
Please note each datafile has header with SCN number and a control file has SCN number as well.
Therefore once this command is issued this going to freeze the SCN number even though the data
file are still written to , which is ok.
2) Cold Backups We completely shutdown the database and copy the data files to the backed up location.