oracle-整库迁移(冷备)
作者:互联网
整库迁移(冷备)
alter database backup controlfile to trace as '/oracle/OCM.stl'; 原库备份控制文件
create pfile='/oracle/SID.ora' from spfile 生成参数文本文件
scp orapwOCM spfileOCM.ora oracle@目标ip:/oracle/product/11.2.0/dbhome_1/dbs 拷贝密码文件和参数文件到备库
startup nomount; 将备库启动到nomount状态
shutdown immediate; 将主库关闭
scp control01.ctl control02.ctl oracle@目标ip:/oracle/oradata/OCM/
scp control03.ctl oracle@目标ip:/data/test/ 拷贝控制文件到备库
startup force mount; 将备库启动到mount状态
scp sysaux01.dbf users01.dbf undotbs01.dbf oracle@目标ip:/oracle/oradata/OCM/
scp system01.dbf jfzl02.dbf oracle@目标ip:/oracle/backup/
scp temp01.dbf jfzl01.dbf oracle@目标ip:/data/test/ 拷贝数据文件和临时表空间数据文件
scp redo01.log redo02.log redo03.log redo11.log redo12.log redo13.log redo14.log oracle@目标ip:/oracle/oradata/OCM/ 拷贝日志文件
alter database open; 开启备库
################################################
select MEMBER from v$logfile; 查看日志文件位置
select dbid from v$database;
select file_name from dba_data_files;查看数据文件位置
select tablespace_name from dba_temp_files; 查看临时文件位置
标签:冷备,备库,log,ip,整库,dbf,oracle,scp 来源: https://blog.csdn.net/donglingjiu/article/details/90939896