First, create a recovery directory
1, the establishment of the table space
Create tablespace rc_data datafile '/u01/app/oracle/oradata/ocp/rc_data.dbf ' size 50m;
2, build users
Create user RC_OCP identified by RC_OCP default tablespace rc_data quota on unlimited;
3. Authorization
Grant Connect,resource,recovery_catalog_owner to RC_OCP;
4, create a directory
Rman Catalog RC_OCP/RC_OCP
Create catalog;
5, registration
Rman Target SYS/ORACLE@OCP Catalog RC_OCP/RC_OCP@OCP
Register database;
6, check incarnation
List incarnation;
Second, the Virtual Private directory:
1. First create the table space, the user, authorize
Sys@ocp>create user V_user1 identified by v_user1 default tablespace TP1 temporary tablespace temp quota unlimited on t P1;
Sys@ocp> Grant Recovery_catalog_owner to V_user1;
2. Login to V_user1 user authorization with basic recovery directory
[oracle@ocm ~]$ Rman Catalog RC_OCP/RC_OCP
Grant catalog for the database OCP to V_user1;
Grant catalog for the database ocm to V_user1;
3. Login with virtual user, build recovery directory
[oracle@ocm ~]$ Rman Catalog V_user1/v_user1
Create virtual catalog;
List incarnation
4.sqlplus V_user1/v_user1
SELECT * from Rc_backup_datafile;
Third, backup scripts
Create Script datafile_5{
Backup DataFile 5;
}
Run{execute script full_db;}
Rman Target Sys/oracle@oca Catalog Rc_admin/rc_admin@oca script Datafile_4
List script names;
Print script datafile_4;
Replace Script datafile_4{
Backup format= '/backup/rman/full_%u '
Database
}
Four, common operation
Delete Script full_db;
Resync Catalog;
Unregister database;
Upgrade Catalog;
Drop catalog;
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/