rman的簡單使用: catalog的建立
SQL> select name from V$datafile;
NAME
/oracle/oracle
/oracle/oracle
/oracle/oracle
/oracle/oracle
/oracle/oracle
/oracle/oracle
/oracle/oracle
/oracle/oracle
/oracle/oracle
/oracle/oracle
/oracle/oradata/webdb_file
NAME
/oracle/oradata/webdb_file
/oracle/oradata/webdb_file
/oracle/oradata/webdb_file
SQL> create tablespace back_up datafile
Tablespace created
SQL> create user rman identified by rman default tablespace back_up temmporary tablespace temp;
create user rman identified by rman default tablespace back_up temmporary tablespace temp
*
ERROR at line
ORA
SQL> create user rman identified by rman default tablespace back_up temporary tablespace temp;
User created
SQL> grant connect
Grant succeeded
SQL> quit
Disconnected from Oracle
With the Partitioning
JServer Release
bash
Recovery Manager: Release
Copyright (c)
RMAN> connect catalog rman/rman;
connected to recovery catalog database
recovery catalog is not installed
RMAN> create catalog tablespace backup;
RMAN
RMAN
RMAN
RMAN
RMAN
RMAN
RMAN
RMAN
RMAN
RMAN
RMAN
RMAN
RMAN> create catalog tablespace back_up;
recovery catalog created
RMAN> quit
Recovery Manager complete
bash
Recovery Manager: Release
Copyright (c)
target database Password:
connected to target database: testmysiteOK (DBID=
connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> backup full tag
Starting backup at
allocated channel: ORA_DISK_
channel ORA_DISK_
channel ORA_DISK_
channel ORA_DISK_
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
input datafile fno=
channel ORA_DISK_
channel ORA_DISK_
piece handle=/data/ora_backup/testmysiteok_
channel ORA_DISK_
Finished backup at
RMAN> configure retention policy to redundancy
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set
Backup Piece
Archive Log
RMAN> list backup;
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy
using channel ORA_DISK_
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
Backup Set
Backup Piece
Archive Log
Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=/oracle/testmysiteok
Deleted
From:http://tw.wingwit.com/Article/program/Oracle/201311/18428.html