Snowfun

导航

 

 

 

[root@oraclea ~]# su - oracle
[oracle@oraclea ~]$ bplist -C oracle-db1 -s 03/10/2018 -e 03/11/2018 -k oracle_oracle-db1_0_17_arch -t 4 -R -b -l  /
-rw-rw---- oracle    asmadmin     20447232 Mar 11 03:00 /cntrl_4852_1_970455842
-rw-rw---- oracle    asmadmin      8650752 Mar 11 03:00 /al_4851_1_970455815
-rw-rw---- oracle    asmadmin      2621440 Mar 11 03:00 /al_4850_1_970455815
-rw-rw---- oracle    asmadmin     20447232 Mar 10 16:37 /cntrl_4826_1_970418455
-rw-rw---- oracle    asmadmin     10747904 Mar 10 16:36 /al_4824_1_970418378
-rw-rw---- oracle    asmadmin     13631488 Mar 10 16:36 /al_4825_1_970418378
-rw-rw---- oracle    asmadmin     20447232 Mar 10 12:30 /cntrl_4821_1_970403640
-rw-rw---- oracle    asmadmin     42729472 Mar 10 12:30 /al_4820_1_970403613
-rw-rw---- oracle    asmadmin    249036800 Mar 10 12:30 /al_4819_1_970403612
-rw-rw---- oracle    asmadmin     20447232 Mar 10 03:01 /cntrl_4818_1_970369482
-rw-rw---- oracle    asmadmin     16515072 Mar 10 03:00 /al_4817_1_970369415
-rw-rw---- oracle    asmadmin      8650752 Mar 10 03:00 /al_4816_1_970369415

 二、.首先自己新建pfile文件或直接从原数据库服务器拷贝参数文件并修改相关路劲和参数,

 

 

三、

rman target /

startup nomount;

run{
 allocate channel ch00 type 'SBT_TAPE';
 send 'nb_ora_serv=nbumaster01';
 send 'nb_ora_client=oracle-db1';
 restore controlfile from 'cntrl_4852_1_970455842';
 release channel ch00;
}

 

四、

alter database mount;

run{
 allocate channel ch00 type 'SBT_TAPE';
 allocate channel ch01 type 'SBT_TAPE';
 send 'nb_ora_serv=nbumaster01';
 send 'nb_ora_client=oracle-db1';
 set newname for datafile 1 to '+DATA2/RACDB/DATAFILE/system.260.935591737';
 set newname for datafile 2 to '+DATA2/RACDB/DATAFILE/sysaux.267.935591737';
 set newname for datafile 3 to '+DATA2/RACDB/DATAFILE/undotbs1.263.935591737';
 set newname for datafile 4 to '+DATA2/RACDB/DATAFILE/users.266.935591737';
 set newname for datafile 5 to '+DATA2/RACDB/DATAFILE/undotbs2.262.935591889';
 set newname for datafile 6 to '+DATA2/RACDB/DATAFILE/siebeldata.264.935672143';
 set newname for datafile 7 to '+DATA2/RACDB/DATAFILE/siebelindex.259.935672375';
 set newname for datafile 8 to '+DATA2/RACDB/DATAFILE/prod_mds.258.946840155';
 set newname for datafile 9 to '+DATA2/RACDB/DATAFILE/prod_biplatform.257.946840155';
 set newname for datafile 10 to '+DATA2/RACDB/DATAFILE/dev_mds.288.953377671';
 set newname for datafile 11 to '+DATA2/RACDB/DATAFILE/dev_biplatform.290.953377671';
 set newname for tempfile 1 to '+DATA2/RACDB/tempfile/temp.270.935591821';
 set newname for tempfile 2 to '+DATA2/RACDB/tempfile/prod_ias_temp.256.946840157';
 set newname for tempfile 3 to '+DATA2/RACDB/tempfile/dev_ias_temp.289.953377671';
 restore  database until time "to_date('2018/03/11 03:00:00','yyyy/mm/dd hh24:mi:ss')";
 switch datafile all;
 switch tempfile all;
 release channel ch00;
 release channel ch01;

}


 

http://www.cnblogs.com/guipeng/p/7141026.html

posted on 2018-03-12 01:09  Snowfun  阅读(313)  评论(0编辑  收藏  举报