Oracle database 12cRAC异地恢复至单机

news2024/12/23 12:58:30

环境

rac 环境 byoradbrac Oracle12.1.0.2

系统版本:Red Hat Enterprise Linux Server release 6.5
软件版本:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
byoradb1:172.17.38.44
byoradb2:172.17.38.45

单机环境 byoradb Oracle12.1.0.2

系统版本:CentOS Linux release 7.9.2009
软件版本:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
byoradb:172.17.38.55

rac环境挂载共享盘

可参考Linux 挂载 linux/Windows 共享目录

在服务器端(172.17.38.55)安装 NFS

sudo yum install nfs-utils

创建要共享的目录

创建一个名为 /shared 的目录:

sudo mkdir /shared

修改 NFS 配置文件

编辑 /etc/exports 文件,添加你想要共享的目录和允许访问的客户端 IP 地址。例如:

sudo vi /etc/exports

在文件中添加以下行(替换为你的客户端 IP 地址):

/shared 172.17.38.44(rw,sync,anonuid=502,anongid=501)

anonuid 为 172.17.38.44 上oracle用户id
anongid 为 172.17.38.44 上 oinstall 组id

 exportfs -r

配置即时生效
启动 NFS 服务

sudo systemctl start nfs-server
sudo systemctl enable nfs-server

在客户端(172.17.38.44)挂载共享目录

创建一个挂载点/nob:

sudo mkdir /nob

可以使用以下命令将服务器的共享目录挂载到这个挂载点:

sudo mount -t nfs 172.17.38.55:/shared /nob

rac备份

备份脚本

rman target /
run {
  allocate channel ch1 device type disk format '/nob/backup/datafile_backup_%U';
  backup database include current controlfile spfile;
  release channel ch1;
  allocate channel ch2 device type disk format '/nob/backup/controlfile_backup_%U';
  backup current controlfile;
  release channel ch2;
  allocate channel ch3 device type disk format '/nob/backup/spfile_backup_%U';
  backup spfile;
  release channel ch3;
}

创建参数文件(基于单机或rac创建都可以)

SQL> create pfile='/shared/backup/initbyoradb.ora' from spfile;

修改参数文件

此处使用单机pfile修改 需先在单机安装数据库
也可使用rac环境pfile修改需注意各个文件路径

vi /shared/backup/initbyoradb.ora

byoradb.__data_transfer_cache_size=0
byoradb.__db_cache_size=1761607680
byoradb.__java_pool_size=16777216
byoradb.__large_pool_size=150994944
byoradb.__oracle_base='/oracledata/app/oracle'#ORACLE_BASE set from environment
byoradb.__pga_aggregate_target=822083584
byoradb.__sga_target=2432696320
byoradb.__shared_io_pool_size=0
byoradb.__shared_pool_size=486539264
byoradb.__streams_pool_size=0
enable_pluggable_database=true
*.audit_file_dest='/oracledata/app/oracle/admin/byoradb/adump'
*.audit_trail='db'
*.compatible='12.1.0.2.0'
*.control_files='/oracledata/app/oracle/oradata/byoradb/control01.ctl','/oracledata/app/oracle/flash_recovery_area/byoradb/control02.ctl'#Restore Controlfile
*.db_block_size=8192
*.db_domain=''
*.db_name='byoradb'
*.db_recovery_file_dest='/oracledata/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4560m
*.diagnostic_dest='/oracledata/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=byoradbXDB)'
*.open_cursors=300
*.pga_aggregate_target=770m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=2310m
*.undo_tablespace='UNDOTBS1'

需注意是否使用pdb,如果使用pdb,此参数应为true

 enable_pluggable_database=true

单机恢复(172.17.38.55)

需预先安装好数据库软件
可参考
Oracle database 静默安装 oracle12c 一键安装 12.1.0.2

复制备份文件并修改权限

mkdir /backup
cd /shared/backup
cp * /backup
chown oracle:oinstall -R /backup

恢复控制文件

rman target /

#开启数据库至nomount状态 注意参数文件位置与权限
startup nomount pfile 'backup/initbyoradb.ora';
#恢复控制文件
restore controlfile from '/backup/controlfile_backup_k12fejsm_1_1';
#开启数据库至mount
alter database mount;
#注册备份文件
catalog start with '/backup/'

修改redo路径

RMAN> select * from v$logfile;
   
alter database rename file '+DATA/byoradb/redo01.log' to  '/oracledata/app/oracle/oradata/onlinelog/redo01.log';
alter database rename file '+DATA/byoradb/redo02.log' to  '/oracledata/app/oracle/oradata/onlinelog/redo02.log';
alter database rename file '+DATA/byoradb/redo03.log' to  '/oracledata/app/oracle/oradata/onlinelog/redo03.log';
alter database rename file '+DATA/byoradb/redo04.log' to  '/oracledata/app/oracle/oradata/onlinelog/redo04.log';

修改数据文件路径 (rac上查询)

select  file# ,name  from v$datafile;

在这里插入图片描述

#根据实际情况修改sql
select 'SET NEWNAME FOR DATAFILE '|| file# ||' to ' ||'''/oracledata/app/oracle/oradata/DATAFILE'|| substr(name,INSTR(name, '/',-1))  ||''''|| ';' from v$datafile;

在这里插入图片描述
修改成单机数据文件期望存放位置
注意目录需提前创建好、

执行恢复脚本

run{
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
SET NEWNAME FOR DATAFILE 1 to '/oracledata/app/oracle/oradata/DATAFILE/system01.dbf';
SET NEWNAME FOR DATAFILE 3 to '/oracledata/app/oracle/oradata/DATAFILE/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 4 to '/oracledata/app/oracle/oradata/DATAFILE/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 5 to '/oracledata/app/oracle/oradata/DATAFILE/system.267.946651233';
SET NEWNAME FOR DATAFILE 6 to '/oracledata/app/oracle/oradata/DATAFILE/users01.dbf';
SET NEWNAME FOR DATAFILE 7 to '/oracledata/app/oracle/oradata/DATAFILE/sysaux.266.946651233';
SET NEWNAME FOR DATAFILE 8 to '/oracledata/app/oracle/oradata/DATAFILE/undotbs02.dbf';
SET NEWNAME FOR DATAFILE 9 to '/oracledata/app/oracle/oradata/DATAFILE/portaltest_system.dbf';
SET NEWNAME FOR DATAFILE 10 to '/oracledata/app/oracle/oradata/DATAFILE/portaltest_sysaux.dbf';
SET NEWNAME FOR DATAFILE 11 to '/oracledata/app/oracle/oradata/DATAFILE/portaltest_users01.dbf';
SET NEWNAME FOR DATAFILE 13 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_ias_ums.264.960632073';
SET NEWNAME FOR DATAFILE 14 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_iau.266.960632075';
SET NEWNAME FOR DATAFILE 15 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_ias_opss.267.960632077';
SET NEWNAME FOR DATAFILE 16 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_wls.260.960632077';
SET NEWNAME FOR DATAFILE 17 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_mds.262.960632079';
SET NEWNAME FOR DATAFILE 18 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_ess.259.960632081';
SET NEWNAME FOR DATAFILE 19 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_soainfra.261.960632081';
SET NEWNAME FOR DATAFILE 20 to '/oracledata/app/oracle/oradata/DATAFILE/qas_iau.280.947953527';
SET NEWNAME FOR DATAFILE 21 to '/oracledata/app/oracle/oradata/DATAFILE/qas_mds.285.947953529';
SET NEWNAME FOR DATAFILE 22 to '/oracledata/app/oracle/oradata/DATAFILE/qas_wls.278.947953529';
SET NEWNAME FOR DATAFILE 23 to '/oracledata/app/oracle/oradata/DATAFILE/qas_stb.279.947953529';
SET NEWNAME FOR DATAFILE 24 to '/oracledata/app/oracle/oradata/DATAFILE/qas_ess.284.947953529';
SET NEWNAME FOR DATAFILE 25 to '/oracledata/app/oracle/oradata/DATAFILE/qas_ias_opss.283.947953531';
SET NEWNAME FOR DATAFILE 26 to '/oracledata/app/oracle/oradata/DATAFILE/qas_ias_ums.281.947953531';
SET NEWNAME FOR DATAFILE 27 to '/oracledata/app/oracle/oradata/DATAFILE/qas_soainfra.282.947953531';
SET NEWNAME FOR DATAFILE 28 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_stb.263.960632083';
SET NEWNAME FOR DATAFILE 29 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_users_data.dbf';
SET NEWNAME FOR DATAFILE 32 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_portalprod_system.dbf';
SET NEWNAME FOR DATAFILE 33 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_portalprod_sysaux.dbf';
SET NEWNAME FOR DATAFILE 36 to '/oracledata/app/oracle/oradata/DATAFILE/catdb_system.dbf';
SET NEWNAME FOR DATAFILE 37 to '/oracledata/app/oracle/oradata/DATAFILE/catdb_sysaux.dbf';
SET NEWNAME FOR DATAFILE 38 to '/oracledata/app/oracle/oradata/DATAFILE/tbs_catalog.dbf';
SET NEWNAME FOR DATAFILE 39 to '/oracledata/app/oracle/oradata/DATAFILE/dcloud2.dbf';
SET NEWNAME FOR DATAFILE 44 to '/oracledata/app/oracle/oradata/DATAFILE/hcmodi_wls.346.970670425';
SET NEWNAME FOR DATAFILE 45 to '/oracledata/app/oracle/oradata/DATAFILE/hcmodi_iau.326.970670429';
SET NEWNAME FOR DATAFILE 46 to '/oracledata/app/oracle/oradata/DATAFILE/hcmodi_odi_user.323.970670431';
SET NEWNAME FOR DATAFILE 47 to '/oracledata/app/oracle/oradata/DATAFILE/hcmodi_ias_opss.324.970670433';
SET NEWNAME FOR DATAFILE 48 to '/oracledata/app/oracle/oradata/DATAFILE/hcmodi_stb.350.970670435';
SET NEWNAME FOR DATAFILE 49 to '/oracledata/app/oracle/oradata/DATAFILE/bahealhcm_data.dbf';
SET NEWNAME FOR DATAFILE 50 to '/oracledata/app/oracle/oradata/DATAFILE/bahealbpm_data.dbf';
SET NEWNAME FOR DATAFILE 51 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_bahealhcm_data.dbf';
SET NEWNAME FOR DATAFILE 52 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_bahealbpm_data.dbf';
SET NEWNAME FOR DATAFILE 53 to '/oracledata/app/oracle/oradata/DATAFILE/bahealout_data.dbf';
SET NEWNAME FOR DATAFILE 54 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_bahealout_data.dbf';
SET NEWNAME FOR DATAFILE 55 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_02.dbf';
SET NEWNAME FOR DATAFILE 56 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_03.dbf';
SET NEWNAME FOR DATAFILE 57 to '/oracledata/app/oracle/oradata/DATAFILE/system.360.996936127';
SET NEWNAME FOR DATAFILE 58 to '/oracledata/app/oracle/oradata/DATAFILE/sysaux.356.996936127';
SET NEWNAME FOR DATAFILE 59 to '/oracledata/app/oracle/oradata/DATAFILE/users.357.996936127';
SET NEWNAME FOR DATAFILE 60 to '/oracledata/app/oracle/oradata/DATAFILE/dis_data.361.996936127';
SET NEWNAME FOR DATAFILE 61 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_biplatform.292.957175159';
SET NEWNAME FOR DATAFILE 63 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ias_portlet.288.957175163';
SET NEWNAME FOR DATAFILE 64 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ias_iau.318.957175165';
SET NEWNAME FOR DATAFILE 65 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ias_webcenter.317.957175167';
SET NEWNAME FOR DATAFILE 66 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ocssearch.289.957175167';
SET NEWNAME FOR DATAFILE 67 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_urmserver.313.957175169';
SET NEWNAME FOR DATAFILE 68 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ipm.291.957175171';
SET NEWNAME FOR DATAFILE 69 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_orairm.299.957175173';
SET NEWNAME FOR DATAFILE 70 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ocs.307.957175173';
SET NEWNAME FOR DATAFILE 71 to '/oracledata/app/oracle/oradata/DATAFILE/bahealmon.dbf';
SET NEWNAME FOR DATAFILE 72 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_system.dbf';
SET NEWNAME FOR DATAFILE 73 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ias_opss.311.957175179';
SET NEWNAME FOR DATAFILE 74 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_sysaux.dbf';
SET NEWNAME FOR DATAFILE 75 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_capture.304.957175183';
SET NEWNAME FOR DATAFILE 76 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ias_discuss.287.957175185';
SET NEWNAME FOR DATAFILE 77 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_ias_activity.310.957175185';
SET NEWNAME FOR DATAFILE 78 to '/oracledata/app/oracle/oradata/DATAFILE/portaluat_mds.290.957175187';
SET NEWNAME FOR DATAFILE 79 to '/oracledata/app/oracle/oradata/DATAFILE/bahealidm_data.dbf';
SET NEWNAME FOR DATAFILE 80 to '/oracledata/app/oracle/oradata/DATAFILE/bahealucm_data.dbf';
SET NEWNAME FOR DATAFILE 81 to '/oracledata/app/oracle/oradata/DATAFILE/dcloud.dbf';
SET NEWNAME FOR DATAFILE 82 to '/oracledata/app/oracle/oradata/DATAFILE/portal_data.dbf';
SET NEWNAME FOR DATAFILE 83 to '/oracledata/app/oracle/oradata/DATAFILE/soaprd_users01.dbf';
SET NEWNAME FOR DATAFILE 84 to '/oracledata/app/oracle/oradata/DATAFILE/bahealoa.dbf';
SET NEWNAME FOR DATAFILE 85 to '/oracledata/app/oracle/oradata/DATAFILE/df_stage_space.dbf';
SET NEWNAME FOR DATAFILE 86 to '/oracledata/app/oracle/oradata/DATAFILE/osb01.dbf';
SET NEWNAME FOR DATAFILE 87 to '/oracledata/app/oracle/oradata/DATAFILE/dsgc_cfg_ts_01.dbf';
SET NEWNAME FOR DATAFILE 88 to '/oracledata/app/oracle/oradata/DATAFILE/dsgc_log_pl_pinited_01.dbf';
SET NEWNAME FOR DATAFILE 89 to '/oracledata/app/oracle/oradata/DATAFILE/dsgc_log_rec_pinited_01.dbf';
SET NEWNAME FOR DATAFILE 90 to '/oracledata/app/oracle/oradata/DATAFILE/dsgc_log_common_01.dbf';
SET NEWNAME FOR DATAFILE 91 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_04.dbf';
SET NEWNAME FOR DATAFILE 92 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_mds02.dbf';
SET NEWNAME FOR DATAFILE 93 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_soainfra02.dbf';
SET NEWNAME FOR DATAFILE 94 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_05.dbf';
SET NEWNAME FOR DATAFILE 95 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_06.dbf';
SET NEWNAME FOR DATAFILE 96 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_07.dbf';
SET NEWNAME FOR DATAFILE 97 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_08.dbf';
SET NEWNAME FOR DATAFILE 98 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_09.dbf';
SET NEWNAME FOR DATAFILE 99 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_10.dbf';
SET NEWNAME FOR DATAFILE 100 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_11.dbf';
SET NEWNAME FOR DATAFILE 101 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_12.dbf';
SET NEWNAME FOR DATAFILE 102 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_13.dbf';
SET NEWNAME FOR DATAFILE 103 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_14.dbf';
SET NEWNAME FOR DATAFILE 104 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_15.dbf';
SET NEWNAME FOR DATAFILE 105 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soaprd_soainfra_16.dbf';
SET NEWNAME FOR DATAFILE 107 to '/oracledata/app/oracle/oradata/DATAFILE/olts_default.340.957371529';
SET NEWNAME FOR DATAFILE 108 to '/oracledata/app/oracle/oradata/DATAFILE/bahealoamuat_ias_opss.343.957371533';
SET NEWNAME FOR DATAFILE 109 to '/oracledata/app/oracle/oradata/DATAFILE/olts_battrstore.342.957371533';
SET NEWNAME FOR DATAFILE 110 to '/oracledata/app/oracle/oradata/DATAFILE/bahealoamuat_mds.347.957371535';
SET NEWNAME FOR DATAFILE 111 to '/oracledata/app/oracle/oradata/DATAFILE/olts_attrstore.344.957371537';
SET NEWNAME FOR DATAFILE 112 to '/oracledata/app/oracle/oradata/DATAFILE/bahealoamuat_apm.345.957371539';
SET NEWNAME FOR DATAFILE 113 to '/oracledata/app/oracle/oradata/DATAFILE/bahealoamuat_ias_iau.335.957371541';
SET NEWNAME FOR DATAFILE 114 to '/oracledata/app/oracle/oradata/DATAFILE/olts_svrmgstore.330.957371543';
SET NEWNAME FOR DATAFILE 115 to '/oracledata/app/oracle/oradata/DATAFILE/olts_ct_store.331.957371545';
SET NEWNAME FOR DATAFILE 116 to '/oracledata/app/oracle/oradata/DATAFILE/bahealoamuat_oam.329.957371547';
SET NEWNAME FOR DATAFILE 117 to '/oracledata/app/oracle/oradata/DATAFILE/bahealoamuat_omsm_ts.333.957371547';
SET NEWNAME FOR DATAFILE 118 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_iau.328.957527675';
SET NEWNAME FOR DATAFILE 119 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_ias_opss.301.957527679';
SET NEWNAME FOR DATAFILE 120 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_ess.337.957527679';
SET NEWNAME FOR DATAFILE 121 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_stb.334.957527681';
SET NEWNAME FOR DATAFILE 122 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_ias_ums.306.957527683';
SET NEWNAME FOR DATAFILE 123 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_soainfra.293.957527685';
SET NEWNAME FOR DATAFILE 124 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_wls.308.957527685';
SET NEWNAME FOR DATAFILE 125 to '/oracledata/app/oracle/oradata/DATAFILE/soauat_mds.300.957527687';
SET NEWNAME FOR DATAFILE 126 to '/oracledata/app/oracle/oradata/DATAFILE/system.371.1107951849';
SET NEWNAME FOR DATAFILE 127 to '/oracledata/app/oracle/oradata/DATAFILE/sysaux.372.1107951849';
SET NEWNAME FOR DATAFILE 128 to '/oracledata/app/oracle/oradata/DATAFILE/system.374.1107951937';
SET NEWNAME FOR DATAFILE 129 to '/oracledata/app/oracle/oradata/DATAFILE/sysaux.375.1107951937';
SET NEWNAME FOR DATAFILE 130 to '/oracledata/app/oracle/oradata/DATAFILE/temp_romens2fi_dev.dbf';
SET NEWNAME FOR DATAFILE 131 to '/oracledata/app/oracle/oradata/DATAFILE/temp_romens2fi_prod.dbf';
SET NEWNAME FOR DATAFILE 134 to '/oracledata/app/oracle/oradata/DATAFILE/odiprd_odi_user.268.958224981';
SET NEWNAME FOR DATAFILE 137 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ias_orasdpm.273.958234613';
SET NEWNAME FOR DATAFILE 138 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_capture.274.958234615';
SET NEWNAME FOR DATAFILE 139 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_soainfra.277.958234619';
SET NEWNAME FOR DATAFILE 140 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ipm.278.958234619';
SET NEWNAME FOR DATAFILE 141 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ias_activity.279.958234621';
SET NEWNAME FOR DATAFILE 142 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ias_discuss.282.958234625';
SET NEWNAME FOR DATAFILE 143 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ias_portlet.283.958234625';
SET NEWNAME FOR DATAFILE 144 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ocssearch.284.958234627';
SET NEWNAME FOR DATAFILE 145 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_biplatform.285.958234627';
SET NEWNAME FOR DATAFILE 146 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_orairm.286.958234629';
SET NEWNAME FOR DATAFILE 147 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_mds.288.958234631';
SET NEWNAME FOR DATAFILE 148 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ias_webcenter.289.958234631';
SET NEWNAME FOR DATAFILE 149 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ocs.292.958234635';
SET NEWNAME FOR DATAFILE 150 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_ias_opss.293.958234637';
SET NEWNAME FOR DATAFILE 151 to '/oracledata/app/oracle/oradata/DATAFILE/portalprd_urmserver.294.958234639';
SET NEWNAME FOR DATAFILE 152 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_bahealoa_data.dbf';
SET NEWNAME FOR DATAFILE 153 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_bahealidm_data.dbf';
SET NEWNAME FOR DATAFILE 154 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_dcloud.dbf';
SET NEWNAME FOR DATAFILE 155 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_portal_data.dbf';
SET NEWNAME FOR DATAFILE 156 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_dportal_data.dbf';
SET NEWNAME FOR DATAFILE 176 to '/oracledata/app/oracle/oradata/DATAFILE/soa_stb.301.959687985';
SET NEWNAME FOR DATAFILE 177 to '/oracledata/app/oracle/oradata/DATAFILE/PORTALPROD_soa_servgov.dbf';
SET NEWNAME FOR DATAFILE 178 to '/oracledata/app/oracle/oradata/DATAFILE/olts_default.269.960215845';
SET NEWNAME FOR DATAFILE 179 to '/oracledata/app/oracle/oradata/DATAFILE/olts_battrstore.272.960215845';
SET NEWNAME FOR DATAFILE 181 to '/oracledata/app/oracle/oradata/DATAFILE/olts_attrstore.303.960215849';
SET NEWNAME FOR DATAFILE 187 to '/oracledata/app/oracle/oradata/DATAFILE/olts_svrmgstore.313.960215861';
SET NEWNAME FOR DATAFILE 188 to '/oracledata/app/oracle/oradata/DATAFILE/olts_ct_store.315.960215863';
SET NEWNAME FOR DATAFILE 189 to '/oracledata/app/oracle/oradata/DATAFILE/idmprd_mds.314.960560321';
SET NEWNAME FOR DATAFILE 190 to '/oracledata/app/oracle/oradata/DATAFILE/idmprd_omsm_ts.309.960560323';
SET NEWNAME FOR DATAFILE 191 to '/oracledata/app/oracle/oradata/DATAFILE/idmprd_ias_opss.311.960560325';
SET NEWNAME FOR DATAFILE 192 to '/oracledata/app/oracle/oradata/DATAFILE/idmprd_ias_iau.312.960560327';
SET NEWNAME FOR DATAFILE 193 to '/oracledata/app/oracle/oradata/DATAFILE/idmprd_apm.305.960560329';
SET NEWNAME FOR DATAFILE 194 to '/oracledata/app/oracle/oradata/DATAFILE/idmprd_oam.308.960560331';
restore database root ;
restore database "PDB$SEED" ;
restore pluggable database PORTALTEST;
restore pluggable database PORTALPROD;
restore pluggable database CATDB;
restore pluggable database BIEEDB;
restore pluggable database SOAPRD;
restore pluggable database TEMP_ROMENS2FI_DEV;
restore pluggable database TEMP_ROMENS2FI_PROD;
switch datafile all;
release channel d4;
release channel d3;
release channel d2;
release channel d1;
}

打开数据库

>RMAN alter database open resetlogs;

顺利的话直接打开、 不顺利的话根据报错排查trc

#xxxx 为报错的进程id
find / -name  *xxxx*.trc 

如果极端情况问题无法解决
可参考此文章中的重建控制文件方式、
Oracle Database 11g RAC 迁移至单机

可能遇到的问题

如果 trc文件中提示asm background 之类的信息
是12.1的bug、需要打补丁解决

如果提示 ACDRROWTSINTCOL#
可能是由于备份文件与数据库版本不一致的原因导致

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1361419.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

2023中国PostgreSQL数据库生态大会-核心PPT资料下载

一、峰会简介 大会以“极速进化融合新生”为主题,探讨了PostgreSQL数据库生态的发展趋势和未来方向。 在大会主论坛上,专家们就PostgreSQL数据库的技术创新、应用实践和生态发展进行了深入交流。同时,大会还设置了技术创新&云原生论坛、…

docker部署kibana

1,简介 官网 kibana 2,安装docker 参考 linux安装docker 3,准备 Kibana 配置文件 # 进入主节点配置文件目录 cd /export/server/docker/kibana/config # 编辑单机版配置文件 vi kibana.ymlkibana.yml内容 # 主机地址,可以是…

2024/1/7周报

文章目录 摘要Abstract文献阅读题目引言贡献相关工作Temporal RecommendationSequential Recommendation 方法Problem FormulationInput EmbeddingSelf-Attention StructureModel Training 实验数据集实验过程实验结果 深度学习Self-attention多头机制堆叠多层 总结 摘要 本周…

从0开始python学习-42.requsts统一请求封装

统一请求封装的目的: 1.去除重复的冗余的代码 2. 跨py文件实现通过一个sess来自动关联有cookie关联的接口。 3. 设置统一的公共参数,统一的文件处理,统一的异常处理,统一的日志监控,统一的用例校验等 封装前原本代…

案例093:基于微信小程序的南宁周边乡村游设计与实现

文末获取源码 开发语言:Java 框架:SSM JDK版本:JDK1.8 数据库:mysql 5.7 开发软件:eclipse/myeclipse/idea Maven包:Maven3.5.4 小程序框架:uniapp 小程序开发软件:HBuilder X 小程序…

Redis——centos7环境安装Redis6.2.14版本,make命令编译时报错:jemalloc/jemalloc.h:没有那个文件或目录

一、报错原因 在redis-6.2.14文件夹下有一个README.md文件,有如下一段话: 在构建 Redis 时,通过设置 MALLOC 环境变量来选择非默认的内存分配器。Redis 默认编译并链接到 libc malloc,但在 Linux 系统上,jemalloc 是…

如何实现安卓端与苹果端互通的多种方案

随着移动设备用户的爆炸性增长,跨平台应用开发变得尤为重要。在Android与iOS之间实现互通对于推广应用、增加用户覆盖面和提升用户体验有至关重要的作用。以下是实现Android与iOS互通的多种方案,以及每种方案的实现方法、细节注意点、适合团队的规模和建…

AWS EKS1.26+kubesphere3.4.1

1、前提准备 1台EC2服务器Amazon Linux2,设置admin的角色 安装 aws cli V2 ​ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.zipsudo ./aws/installexport PATH/usr/local/bin:$PATHsou…

OpenHarmony鸿蒙源码下载编译和开发环境搭建

目录 一、开发环境搭建和源码下载二、编译三、总结 一、开发环境搭建 最好是在如Ubuntu18.04以上的系统中搭建,不然有些软件依赖需要解决,加大搭建时间 如gitee中开源OpenHarmony中的文档所示,搭建开发环境,搭建文档网站如下&a…

【算法设计与分析】分治-时间复杂度计算

目录 主定理 Master Theorem分治算法运行时间的递归表示主定理的简化形式 主定理的一般形式 递归树 Recursion Tree递归树的简单结论 主定理 Master Theorem 分治算法运行时间的递归表示 将原问题分解成 a 个子问题递归求解,每个子问题的规模是原问题的 1/b。同时子…

Unity游戏内相机(主角头部视角)的旋转问题:“万向节锁定”(Gimbal Lock)

前言: 在Unity中,相机的正前方是Z正半轴,相机的正右方是X正半轴,相机的正上方是Y正半轴。这个很好理解。 现在,我想要相机看向左前上方45,你会觉得要怎么做呢? 如果是我的话,我的第一…

在VM下使用Composer完成快照方式的软件制作

Composer允许您构建软件、应用程序、偏好设置文件或是文档的安装包,安装包可以部署到远程电脑或是作为镜像流程的一部分。构建软件包的第一步就是创建包源,根据要打包的软件,Composer允许您监视软件的安装和使用驱动器上已存在的文件来创建包…

Linux的top命令

通过top命令可以查看CPU、内存使用情况 -p:只显示某个进程的信息 -d:设置刷新时间 -c:显示产生进程的完整命令,默认是进程名 -n:指定刷新次数 -u:查找特点用户启动的进程 -b:以非交互非全…

【数据结构】八大排序之快速排序算法

🦄个人主页:修修修也 🎏所属专栏:数据结构 ⚙️操作环境:Visual Studio 2022 目录 一.快速排序简介及思路 二.快速排序代码实现的三种方式 📌左右交换法 📌挖坑填坑法 📌前后指针法 三.快速排序的时间复杂度分析…

MvvmToolkit的使用

背景:MvvmLight不更新了,用Toolkit代替 1、首先下载好社区版本的NuGet包 2、ViewModel中需要继承ObservableObject,查看ObservableObject可以看到里面有实现好InotifyPropertyChanged。 3、对于属性的set,可以简写成一行&#xff…

网络名称解读 -入门5

WAN: Wide Area Network(跨区域),LAN: Local Area NetworkWAN MAC, 用来连接上级网络, LAN MAC, 用于内部网路。 LAN & WAN 3.1,LAN表示子网,通过掩码来筛选子网内主机数量&…

【动态规划】【字符串】C++算法:140单词拆分

作者推荐 【动态规划】【字符串】扰乱字符串 本文涉及的基础知识点 动态规划 字符串 LeetCode140:单词拆分 II 给定一个字符串 s 和一个字符串字典 wordDict ,在字符串 s 中增加空格来构建一个句子,使得句子中所有的单词都在词典中。以任意顺序 返回…

创建专业电子邮件签名:提升个人与品牌形象的实用指南

电子邮件签名乃是品牌建设中常被忽略的一环。试想一下,若名片只是普通的、手工切割的复印纸,上面用黑体打印着你的联系方式,那将是多么平凡无奇。这将显得廉价、乏味且不专业——这正是人们不愿如此的原因。相反,他们渴望让自己的…

MySQL-DDL

DDL是数据定义语言,用来定义数据对象(数据库,表,字段) 数据库操作: 1.查询: 查询所有数据库:SHOW DATABASES; 查询当前数据库:SELECT DATABASE(); 2.创建: C…

彻底解决vue-video-player视频铺满div

需求 最近需要接入海康视频摄像头,然后把视频的画面接入到自己的网站系统中。以前对接过rtsp固定IP的显示视频,这次的不一样,没有了固定IP。海康的解决办法是,摄像头通过配置服务器到萤石云平台,然后购买企业版账号和…