具体如下:
cd $ORACLE_HOME/dbs ls -ltr | grep xxx cat xxx.ora #查看或修改参数文件 mkdir -p /u01/app/oracle/admin/xxx/{adump,bdump,cdump,udump} mkdir -p /xxx/{oradata,flash_recovery_area,arch,redolog} ls -ltr /xxx/ | grep auto ls -ltr /xxx chown -R oracle.oinstall /xxx 这里,权限不正确,会影响后面的控制文件的恢复 export ORACLE_SID=xxx export ORACLE_SID=xxx create spfile from pfile='$ORACLE_HOME/dbs/initxxx.ora'; startup nomount; rman target / restore controlfile from '/xxx/auto_controlc-2600836681-20170314-01'; alter database mount; 对于每一个备份片文件,都需要注册到RMAN catalog backuppiece 'xxxx'; run{ allocate channel c1 device type disk; allocate channel c2 device type disk; restore database; recover database; release channel c1; release channel c2; } alter database open resetlogs; select instance_name,status from v$instance;
参数文件:【pfile】
*.audit_file_dest='/u01/app/oracle/admin/xxxx/adump' *.background_dump_dest='/u01/app/oracle/admin/xxxx/bdump' *.compatible='10.2.0.5.0' *.control_files='/xxxx/oradata/control01.ctl','/xxxx/oradata/control02.ctl','/xxxx/oradata/control03.ctl' *.core_dump_dest='/u01/app/oracle/admin/xxxx/cdump' *.db_block_size=8192 *.db_cache_size=5874368000 *.db_domain='' *.db_file_multiblock_read_count=16 *.db_name='xxxx' *.db_recovery_file_dest='/xxxx/flash_recovery_area' *.db_recovery_file_dest_size=2147483648 *.java_pool_size=33554432 *.job_queue_processes=10 *.large_pool_size=67108864 *.log_archive_dest_1='location=/xxxx/arch' *.open_cursors=800 *.optimizer_mode='RULE' *.pga_aggregate_target=3145728000 *.processes=1000 *.remote_login_passwordfile='EXCLUSIVE' *.service_names='xxxx','hftxxxx' *.sessions=1105 *.shared_pool_size=1545728000 *.undo_management='AUTO' *.undo_tablespace='UNDOTBS1' *.user_dump_dest='/u01/app/oracle/admin/xxxx/udump'
——————————————
Done。