2.Create a user for administering
recovery cat.
create user RMAN identified by RMAN
default tablespace RMAN_DATA
temporary tablespace TEMP
quota unlimited on RMAN_DATA;
3.Grant the RMAN user
SYSDBA,SYSOPER roles
grant sysdba,sysoper to rman;
4.Grant connect,resource roles to RMAN
grant connect,resource to RMAN;
5.Grant recovery_catalog_owner to RMAN
grant recovery_catalog_owner to RMAN;
//--//
6.Run catrman.sql script as user RMAN
Where do i find this script!!
//--//
After completing the above steps run the following command to start RMAN
//--//
RMAN target="sys/sys@bscs521"
rcvcat="rman/rman@test521"
Does this remain same or do I have to use diff eg: rman@test521 does it reamin so always?
//--//
U will be getting the RMAN prompt if u have configured correctly.The next step is to register ur target database with RMAN,At this stage all the database schema of the target database gets stored in ur recovery catalog.
RMAN > register database;
Now u can take backups of database,tablespace,redo log files,controlfiles including RMAN.I will give u some examples for each one of it using RMAN
1.To take backup of ur entire database
RMAN > run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
backup
filesperset 5 format 'disk1\backup\fullbackup.bus'
(database include current controlfile);
release channel c1;
release channel c2;
}
//--//
Do I have to follow these steps for all my table spaces?
If yes then while recovery how do I work with that?
//--//
2. To take backup of tablespace(In RMAN u dont have to put ur tablespace in hot backup mode)
RMAN > run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
backup tablespace USERS_DATA;
filesperset 5 format 'disk1\backup\USERSbackup.bus';
release channel c1;
release channel c2;
}
3. To take backup of ur controlfile(In RMAN u have to create image copy of ur controlfile and then copy to tape as image copies cannot be directly copied to TAPE)
RMAN > run
{
allocate channel c1 type disk;
copy
current controlfile to '/disk2/rman/currentcontrol1204200.ctl';
release channel c1;
}
4. To take backup of ur datafile
RMAN > run
{
allocate channel c1 type disk;
copy
datafile 5 to '/disk2/rman/usersdata02.dbf';
release channel c1;
}
5. To take backup of ur redo log files
RMAN > run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
backup
filesperset 5 format 'disk1\backup\archbackup_%d_%s_%p.bus'
(archivelog);
release channel c1;
release channel c2;
}
6. TO restore ur database using RMAN
RMAN > run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
sql "alter tablespace USERS_DATA offline";
restore tablespace USERS_DATA;
recover tablespace USERS_DATA;
sql "alter tablespace USERS_DATA online";
release channel c1;
release channel c2;
}
Use 'create catalog' command instead catrman script in 8i
Bookmarks