备份数据库数据文件

> rman
RMAN> connect target /
RMAN> backup database;
RMAN> backup current controlfile spfile;

 

恢复库,需在mount下执行 或者 先把数据文件offline

SQL> startup mount
> rman target /
RMAN> restore database;
SQL> recover database;


恢复控制文件,nomount下执行
RMAN> restore controlfile;

 

查看备份
RMAN> list backup;

查看数据库表空间:
RMAN> report schema;

 

备份错误解决
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 52428800 bytes disk space from 2147483648 limit


SQL> show parameter db_recover
SQL> alter system set db_recovery_file_dest_size='10G';