物理迁移oracle数据库的简易方法

◆◆物理迁移oracle数据库的简易方法:
◆保证操作系统配置、数据库软件配置、数据库实例服务配置一致;
◆确认tnsnames.ora配置,监听配置一致、正确;
◆关闭数据库,拷贝所有的数据文件dba_data_filesdba_temp_files、控制文件v$controlfile、日志文件v$logfile、配置文件spfile,到目标环境的对应路径:
登录源主机,执行scp操作,拷贝如下文件:
spfile、tnsnames.ora、listener.ora、sqlnet.ora
select tablespace_name,file_name,round(bytes102410241024,0) GB,status from dba_data_files order by file_name;
select tablespace_name,file_name,round(bytes102410241024,0) GB,status from dba_temp_files order by GB;
select member from v$logfile order by 1;
select name from v$controlfile;
◆以下为一个完整示例:
scp $ORACLE_HOMEdbsspfileorcl.ora oracle@192.168.7.102$ORACLE_HOMEdbsspfileorcl.ora
scp $ORACLE_HOMEnetworkadmin.ora oracle@192.168.7.102$ORACLE_HOMEnetworkadmin

oracleoradataORCLdatafileo1_mf_sysaux_9q655kkt_.dbf
oracleoradataORCLdatafileo1_mf_system_9q65506r_.dbf
oracleoradataORCLdatafileo1_mf_undotbs1_9q655xp5_.dbf
oracleoradataORCLdatafileo1_mf_users_9q656fwf_.dbf
oracleoradataORCLdatafileo1_mf_temp_9q65626c_.tmp
scp oracleoradataORCLdatafile oracle@192.168.7.102oracleoradataORCLdatafile

oracleoradataORCLonlinelogo1_mf_1_9q654pvt_.log
oracleoradataORCLonlinelogo1_mf_2_9q654r6b_.log
oracleoradataORCLonlinelogo1_mf_3_9q654t0w_.log
scp oracleoradataORCLonlinelog oracle@192.168.7.102oracleoradataORCLonlinelog

scp oracleoradataORCLcontrolfileo1_mf_9q654ovc_.ctl oracle@192.168.7.102oracleoradataORCLcontrolfileo1_mf_9q654ovc_.ctl

scp oracle2oradataorcldemand.dbf oracle@192.168.7.102oracle2oradataorcldemand.dbf

oracleflash_recovery_areaORCLonlinelogo1_mf_1_9q654qgj_.log
oracleflash_recovery_areaORCLonlinelogo1_mf_2_9q654s4f_.log
oracleflash_recovery_areaORCLonlinelogo1_mf_3_9q654w1b_.log
scp oracleflash_recovery_areaORCLonlinelog oracle@192.168.7.102oracleflash_recovery_areaORCLonlinelog

scp oracleflash_recovery_areaORCLcontrolfileo1_mf_9q654p54_.ctl oracle@192.168.7.102oracleflash_recovery_areaORCLcontrolfileo1_mf_9q654p54_.ctl

标签:

发表评论

电子邮件地址不会被公开。 必填项已用*标注