col current_scn for 9999999999999999
select current_scn from v$database;
backup incremental from scn 6141641970212 database format '/exp/rmanbak/forstandby_%u' tag 'forstanfby'
catalog backuppiece '/oradata/bak'
recover database noredo;
alter database recover managed standby database cancel;
alter database recover managed standby database using current logfile disconnect from session;
select database_role,protection_mode,protection_level,open_mode from v$database;
select unique thread#,max(sequence#) over(partition by thread#)last from v$archived_log;
alter system set db_file_name_convert='+DATA/oracle/tempfile/','/oradata/oracle/' scope=spfile;
alter system set db_file_name_convert='+DATA/oracle/tempfile/','/oradata/oracle/STANDBY/datafile/';
alter system set db_file_name_convert='+DATA/oracle/datafile/','/oradata/oracle/' scope=spfile;
startup nomount;
alter database mount standby database;
select instance_name,status from v$instance;
alter database open read only;
startup pfile='/oracle/app/11.2.0/db_1/dbs/initoracle.ora'
select DEST_NAME , STATUS , RECOVERY_MODE from v$archive_dest_status;
alter database recover managed standby database disconnect from session;
select database_role,protection_mode,protection_level,open_mode from v$database;
select open_mode from v$database;
recover database using backup controlfile;
recover database using backup controlfile until cancel;
recover datafile '/oradata/oracle/system.264.1047747115';
select * from v$managed_standby;
alter database recover managed standby database;
alter database clear unarchived logfile group 17;
select name,sequence#,archived,applied from v$archived_log order by sequence#;
CATALOG START WITH '/oradata/bak';
show parameter log_archive_dest_2
run
{
set newname for datafile 58 to '/oradata/oracle/temp02.dbf';
set newname for datafile 59 to '/oradata/oracle/tsp_medrec01';
set newname for datafile 60 to '/oradata/oracle/tsp_medrec02';
set newname for datafile 61 to '/oradata/oracle/tsp_logs_01';
set newname for datafile 62 to '/oradata/oracle/tsp_insurance.303';
set newname for datafile 63 to '/oradata/oracle/tsp_insurance.304';
set newname for datafile 64 to '/oradata/oracle/tsp_medrec03';
set newname for datafile 65 to '/oradata/oracle/tsp_insurance.305';
set newname for datafile 66 to '/oradata/oracle/tsp_insurance.306';
set newname for datafile 67 to '/oradata/oracle/tsp_medrec04';
set newname for datafile 68 to '/oradata/oracle/tsp_insurance.307.dbf';
set newname for datafile 69 to '/oradata/oracle/tsp_invoice';
set newname for datafile 70 to '/oradata/oracle/tsp_inpbill.310';
set newname for datafile 71 to '/oradata/oracle/tsp_insurance.308.dbf';
set newname for datafile 73 to '/oradata/oracle/tsp_ordadm.292';
set newname for datafile 74 to '/oradata/oracle/tsp_elec_bill.01';
set newname for datafile 75 to '/oradata/oracle/tsp_insurance.309';
set newname for datafile 76 to '/oradata/oracle/tsp_medrec05';
set newname for datafile 77 to '/oradata/oracle/tsp_insurance.310';
set newname for datafile 78 to '/oradata/oracle/tsp_insurance.311';
set newname for datafile 79 to '/oradata/oracle/tsp_insurance.312';
set newname for datafile 80 to '/oradata/oracle/tsp_insurance.313';
set newname for datafile 81 to '/oradata/oracle/tsp_inpbill.311';
set newname for datafile 82 to '/oradata/oracle/tsp_medrec06';
set newname for datafile 83 to '/oradata/oracle/tsp_insurance.314';
set newname for datafile 84 to '/oradata/oracle/tsp_medrec07';
set newname for datafile 85 to '/oradata/oracle/tsp_medrec08';
set newname for datafile 86 to '/oradata/oracle/tsp_insurance.315';
set newname for datafile 87 to '/oradata/oracle/tsp_medrec09';
set newname for datafile 88 to '/oradata/oracle/tsp_logs_02';
set newname for datafile 89 to '/oradata/oracle/tsp_elec_bill.02';
set newname for datafile 90 to '/oradata/oracle/tsp_medrec10';
set newname for datafile 91 to '/oradata/oracle/tsp_insurance_316.dbf';
set newname for datafile 92 to '/oradata/oracle/tsp_insurance_317.dbf';
set newname for datafile 93 to '/oradata/oracle/tsp_insurance_318.dbf';
set newname for datafile 97 to '/oradata/oracle/tsp_elec_bill.03';
set newname for datafile 98 to '/oradata/oracle/users03.dbf';
set newname for datafile 99 to '/oradata/oracle/users04.dbf';
set newname for datafile 100 to '/oradata/oracle/tsp_inpbill_310.dbf';
set newname for datafile 101 to '/oradata/oracle/tsp_econstat.316.dbf';
set newname for datafile 102 to '/oradata/oracle/tsp_outpadm_288.dbf';
set newname for datafile 103 to '/oradata/oracle/hiop_his.dbf';
set newname for datafile 104 to '/oradata/oracle/tsp_econstat.317.dbf';
restore database;
switch datafile all;
}
发表评论