RMAN
Rman is a client program provided by oracle ,This utility stands for R -recovery MAN-manager
Rman is a client program which work as SQL*PLUS utlity, RMAN will be available in the bin directory where the oracle will be installed
eg: <C:\Oracle\app\product\11.1.0\db_1\bin> rman.exe this will be a executable program
To run this utility
We have first set the oracle SID ,
Why we need to connect to oracle SID?
The reason is to tell rman which database we need to connect to So that we can take whole backup
command to connect
prompt>set ORACLE_SID=MYDATABASE
prompt>echo %ORACLE_SID%
Prompt> rman taget / (we dont use sys as sysdba here it implicit)
What about the above command?
Above command is saying is connect to the database for which SID is set to (The database which we are targeting or restoring is known as target database)
when ever you connect to rman it connect as sysdba user is implicit here we dont need that
----
connected to rman DBID<10 digit number>
---
RMAN> backup database;
===
it will start taking up the backup
===
Rman connects to the control files and control files will tell them where the datafiles are .
Oracle strongly recommends that you do not make inconsistent, closed database backups in NOARCHIVELOG mode. If such a backup is used to restore the database, then data corruption might result.
If you run the database in ARCHIVELOG mode, then you do not have to back up the whole database at one time
A backup of online datafiles is called an online backup. This requires that you run your database in ARCHIVELOG mode.
The backup set will have the backup pieces the backup pecies will have the 8 character file which will be named by rman ,
We can spit the database into multiple pecies
To check the list of the backup set we can which with the
RMAN> list backup ;
it will write the backup in the database folder.It will be wrritten in the binary format which rman can read them
---
DELETE the backup
We can use the delete comand
RMAN> delete backup;
it will delete from the disk as well
--------------------
NOW take a backup with the Archive logs
We need a Archive logs backup when the database is runnning to macke backup consistent and to take care of the fractured blocks
RMAN> backup Database archivelogs;
It will switch the and takes the backup of the archive logs
when we restore the backup our it will take care of the
---------------
A whole database backup is either a consistent backup or an inconsistent backup. Whether a backup is consistent determines whether you need to apply redo logs after restoring the backup.
A datafile backup is a backup of a single datafile. Datafile backups, which are not as common as tablespace backups, are valid in ARCHIVELOG databases. The only time a datafile backup is valid for a database in NOARCHIVELOG mode is if:
No comments:
Post a Comment