SAP把Oracle搞的更加复杂了,好在不用oraPRd 用户恢复,只需要用oracle用户恢复。
1.在测试服务器先建立PRD数据库
2.从ERPDB倒备份文件到测试服务器
mkdir /orabak/bdtydrlg
mkdir /orabak/PRDmkdir /orabak/PRDarchchown -R oraprd /orabak/bdtydrlgchown -R oraprd /orabak/PRDchown -R oraprd /orabak/PRDarch将生产系统/orabackup/bdtydrlg,/orabackup/PRD和/oracle/PRD/oraarch/下的东西FTP过来
3.参照SAP备份下来的配置信息在测试服务器建立完全相同的文件路径
mkdir /oraclecd /oraclemkdir PRDcd PRDln -s /orabak/PRDarch oraarchmkdir sapdata3mkdir sapdata4mkdir sapdata5mkdir sapdata6mkdir sapdata7mkdir sapdata8cd sapdata3mkdir prd_1mkdir prd_2mkdir prd_3mkdir prd_4mkdir prd_10mkdir prd_11cd prd_1ln -s /orabak/bdtydrlg/prd.data1 prd.data1cd ../prd_2ln -s /orabak/bdtydrlg/prd.data2 prd.data2cd ../prd_3ln -s /orabak/bdtydrlg/prd.data3 prd.data3cd ../prd_4ln -s /orabak/bdtydrlg/prd.data4 prd.data4cd ../prd_10ln -s /orabak/bdtydrlg/prd.data10 prd.data10cd ../prd_11ln -s /orabak/bdtydrlg/prd.data11 prd.data11cd /oracle/PRD/sapdata4mkdir prd_5mkdir prd_6mkdir prd_7mkdir prd_8mkdir prd_9mkdir prd_12mkdir prd_13mkdir prd_14cd prd_5ln -s /orabak/bdtydrlg/prd.data5 prd.data5cd ../prd_6ln -s /orabak/bdtydrlg/prd.data6 prd.data6cd ../prd_7ln -s /orabak/bdtydrlg/prd.data7 prd.data7cd ../prd_8ln -s /orabak/bdtydrlg/prd.data8 prd.data8cd ../prd_9ln -s /orabak/bdtydrlg/prd.data9 prd.data9cd ../prd_12ln -s /orabak/bdtydrlg/prd.data12 prd.data12cd ../prd_13ln -s /orabak/bdtydrlg/prd.data13 prd.data13cd ../prd_14ln -s /orabak/bdtydrlg/prd.data14 prd.data14cd /oracle/PRD/sapdata5mkdir prd_15mkdir prd_16mkdir prd_17mkdir prd_18mkdir prd_19mkdir prd_20mkdir prd_21mkdir prd_22mkdir prd_23mkdir prd_24mkdir prd_25mkdir prd_26mkdir prd_27mkdir prd_28cd prd_15ln -s /orabak/bdtydrlg/prd.data15 prd.data15cd ../prd_16ln -s /orabak/bdtydrlg/prd.data16 prd.data16cd ../prd_17ln -s /orabak/bdtydrlg/prd.data17 prd.data17cd ../prd_18ln -s /orabak/bdtydrlg/prd.data18 prd.data18cd ../prd_19ln -s /orabak/bdtydrlg/prd.data19 prd.data19cd ../prd_20ln -s /orabak/bdtydrlg/prd.data20 prd.data20cd ../prd_21ln -s /orabak/bdtydrlg/prd.data21 prd.data21cd ../prd_22ln -s /orabak/bdtydrlg/prd.data22 prd.data22cd ../prd_23ln -s /orabak/bdtydrlg/prd.data23 prd.data23cd ../prd_24ln -s /orabak/bdtydrlg/prd.data24 prd.data24cd ../prd_25ln -s /orabak/bdtydrlg/prd.data25 prd.data25cd ../prd_26ln -s /orabak/bdtydrlg/prd.data26 prd.data26cd ../prd_27ln -s /orabak/bdtydrlg/prd.data27 prd.data27cd ../prd_28ln -s /orabak/bdtydrlg/prd.data28 prd.data28cd /oracle/PRD/sapdata6mkdir prd_29mkdir prd_30mkdir prd_31mkdir prd_32mkdir prd_33mkdir prd_34mkdir prd_35mkdir prd_36mkdir prd_37mkdir prd_38cd prd_29ln -s /orabak/bdtydrlg/prd.data29 prd.data29cd ../prd_30ln -s /orabak/bdtydrlg/prd.data30 prd.data30cd ../prd_31ln -s /orabak/bdtydrlg/prd.data31 prd.data31cd ../prd_32ln -s /orabak/bdtydrlg/prd.data32 prd.data32cd ../prd_33ln -s /orabak/bdtydrlg/prd.data33 prd.data33cd ../prd_34ln -s /orabak/bdtydrlg/prd.data34 prd.data34cd ../prd_35ln -s /orabak/bdtydrlg/prd.data35 prd.data35cd ../prd_36ln -s /orabak/bdtydrlg/prd.data36 prd.data36cd ../prd_37ln -s /orabak/bdtydrlg/prd.data37 prd.data37cd ../prd_38ln -s /orabak/bdtydrlg/prd.data38 prd.data38cd /oracle/PRD/sapdata7mkdir prd_39mkdir prd_40mkdir prd_41mkdir prd_42mkdir prd_43mkdir prd_44mkdir prd_45mkdir prd_46mkdir prd_47mkdir prd_48cd prd_39ln -s /orabak/bdtydrlg/prd.data39 prd.data39cd ../prd_40ln -s /orabak/bdtydrlg/prd.data40 prd.data40cd ../prd_41ln -s /orabak/bdtydrlg/prd.data41 prd.data41cd ../prd_42ln -s /orabak/bdtydrlg/prd.data42 prd.data42cd ../prd_43ln -s /orabak/bdtydrlg/prd.data43 prd.data43cd ../prd_44ln -s /orabak/bdtydrlg/prd.data44 prd.data44cd ../prd_45ln -s /orabak/bdtydrlg/prd.data45 prd.data45cd ../prd_46ln -s /orabak/bdtydrlg/prd.data46 prd.data46cd ../prd_47ln -s /orabak/bdtydrlg/prd.data47 prd.data47cd ../prd_48ln -s /orabak/bdtydrlg/prd.data48 prd.data48cd /oracle/PRD/sapdata8mkdir prd_49mkdir prd_50mkdir prd_51mkdir prd_52mkdir prd_53mkdir prd_54mkdir prd_55mkdir prd_56mkdir prd_57mkdir prd_58cd prd_49ln -s /orabak/bdtydrlg/prd.data49 prd.data49cd ../prd_50ln -s /orabak/bdtydrlg/prd.data50 prd.data50cd ../prd_51ln -s /orabak/bdtydrlg/prd.data51 prd.data51cd ../prd_52ln -s /orabak/bdtydrlg/prd.data52 prd.data52cd ../prd_53ln -s /orabak/bdtydrlg/prd.data53 prd.data53cd ../prd_54ln -s /orabak/bdtydrlg/prd.data54 prd.data54cd ../prd_55ln -s /orabak/bdtydrlg/prd.data55 prd.data55cd ../prd_56ln -s /orabak/bdtydrlg/prd.data56 prd.data56cd ../prd_57ln -s /orabak/bdtydrlg/prd.data57 prd.data57cd ../prd_58ln -s /orabak/bdtydrlg/prd.data58 prd.data58cd /oracle/PRD/sapdata9mkdir prd_59mkdir prd_60mkdir prd_61cd prd_59ln -s /orabak/bdtydrlg/prd.data59 prd.data59cd ../prd_60ln -s /orabak/bdtydrlg/prd.data60 prd.data60cd ../prd_61ln -s /orabak/bdtydrlg/prd.data61 prd.data61mkdir /oracle/PRD/sapdata1cd /oracle/PRD/sapdata1mkdir prd620_1mkdir prd620_2mkdir prd620_3mkdir prd620_4cd prd620_1ln -s /orabak/bdtydrlg/prd620.data1 prd620.data1cd ../prd620_2ln -s /orabak/bdtydrlg/prd620.data2 prd620.data2cd ../prd620_3ln -s /orabak/bdtydrlg/prd620.data3 prd620.data3cd ../prd620_4ln -s /orabak/bdtydrlg/prd620.data4 prd620.data4mkdir /oracle/PRD/sapdata2cd /oracle/PRD/sapdata2mkdir prd620_5mkdir prd620_6mkdir prd620_7mkdir prd620_8mkdir prd620_9cd prd620_5ln -s /orabak/bdtydrlg/prd620.data5 prd620.data5cd ../prd620_6ln -s /orabak/bdtydrlg/prd620.data6 prd620.data6cd ../prd620_7ln -s /orabak/bdtydrlg/prd620.data7 prd620.data7cd ../prd620_8ln -s /orabak/bdtydrlg/prd620.data8 prd620.data8cd ../prd620_9ln -s /orabak/bdtydrlg/prd620.data9 prd620.data9cd /oracle/PRD/sapdata3mkdir prd620_10cd prd620_10ln -s /orabak/bdtydrlg/prd620.data10 prd620.data10cd /oracle/PRD/sapdata4mkdir prd620_11cd prd620_11ln -s /orabak/bdtydrlg/prd620.data11 prd620.data11cd /oracle/PRD/sapdata1mkdir prdusr_1mkdir prdusr_2cd prdusr_1ln -s /orabak/bdtydrlg/prdusr.data1 prdusr.data1cd ../prdusr_2ln -s /orabak/bdtydrlg/prdusr.data2 prdusr.data2cd /oracle/PRD/sapdata1mkdir system_1cd system_1ln -s /orabak/bdtydrlg/system.data1 system.data1cd /oracle/PRD/sapdata3mkdir temp_1cd temp_1ln -s /orabak/bdtydrlg/temp.data1 temp.data1cd /oracle/PRD/sapdata2mkdir roll_1mkdir roll_2cd roll_1ln -s /orabak/bdtydrlg/roll.data1 roll.data1cd ../roll_2ln -s /orabak/bdtydrlg/roll.data2 roll.data2cd /orabak/bdtydrlgcp log_g11m1.dbf log_g11m2.dbfcp log_g12m1.dbf log_g12m2.dbfcp log_g13m1.dbf log_g13m2.dbfcp log_g14m1.dbf log_g14m2.dbfmkdir /oracle/PRD/origlogAmkdir /oracle/PRD/mirrlogAmkdir /oracle/PRD/origlogBmkdir /oracle/PRD/mirrlogBcd /oracle/PRD/origlogAln -s /orabak/bdtydrlg/log_g11m1.dbf log_g11m1.dbfcd /oracle/PRD/origlogBln -s /orabak/bdtydrlg/log_g12m1.dbf log_g12m1.dbfcd /oracle/PRD/origlogAln -s /orabak/bdtydrlg/log_g13m1.dbf log_g13m1.dbfcd /oracle/PRD/origlogBln -s /orabak/bdtydrlg/log_g14m1.dbf log_g14m1.dbfcd /oracle/PRD/origlogAln -s /orabak/bdtydrlg/cntrlPRD.dbf cntrlPRD.dbfcd /oracle/PRD/mirrlogAln -s /orabak/bdtydrlg/log_g11m2.dbf log_g11m2.dbfcd /oracle/PRD/mirrlogBln -s /orabak/bdtydrlg/log_g12m2.dbf log_g12m2.dbfcd /oracle/PRD/mirrlogAln -s /orabak/bdtydrlg/log_g13m2.dbf log_g13m2.dbfcd /oracle/PRD/mirrlogBln -s /orabak/bdtydrlg/log_g14m2.dbf log_g14m2.dbfcd /chown -R oracle:dba /oracle
4.启动数据库
su - oracle
eXPort ORACLE_SID=PRDvi init.ora:*.compatible='9.2.0.0.0'*.control_file_record_keep_time=30*.control_files='/oracle/PRD/origlogA/cntrlPRD.dbf'*.core_dump_dest='/orasys/oracle/admin/PRD/cdump'*.db_block_size=8192*.db_cache_size=17179869*.db_domain=''*.db_file_multiblock_read_count=16*.db_name='PRD'*.fast_start_mttr_target=300*.hash_join_enabled=TRUE*.java_pool_size=0*.job_queue_processes=2*.large_pool_size=524288000*.LOG_ARCHIVE_FORMAT='log_%t_%s.arc'*.nls_date_format='YYYY-MM-DD'*.open_cursors=10000*.optimizer_mode='FIRST_ROWS_10'*.pga_aggregate_target=838860800*.processes=900*.query_rewrite_enabled='FALSE'*.remote_login_passWordfile='exclusive'*.shared_pool_size=2147483648*.sort_area_size=52428800*.star_transformation_enabled='FALSE'*.timed_statistics=TRUE*.undo_management='AUTO'*.undo_retention=10800*.user_dump_dest='/orasys/oracle/admin/PRD/udump'*.LOG_ARCHIVE_DEST_1='LOCATION=/oracle/PRD/oraarch'orapwd file='/orasys/oracle/prodUCt/9.2.5/dbs/orapwPRD' password=sys entries=5SQL>startup mount pfile='init.ora'SQL>alter database open;Database altered.
恢复完成。由于SAP将REDOLOG也备份了,因此可以认为是完整的数据恢复。