oracle 异库恢复
来源:互联网 发布:java redis连接池配置 编辑:程序博客网 时间:2024/06/10 23:44
原服务器数据库版本10G,新服务器版本11G
实例名必须相同。
目录最好相同,按原pfile里的有的目录创建
查询原数据库dbid
select dbid from v$database;
RMAN> set dbid=844174343
executing command: SET DBID
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/oracle/db/dbs/initxezf.ora'
starting Oracle instance without parameter file for retrieval of spfile
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 05/12/2017 11:38:58
RMAN-04014: startup failed: ORA-04031: unable to allocate 3978656 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","FileOpenBlock")
原服务器scp 一份spfile或者pfile到新服务器
RMAN> startup nomount
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 05/12/2017 11:48:38
RMAN-04014: startup failed: ORA-16032: parameter LOG_ARCHIVE_DEST_1 destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory
RMAN-04017: startup error description: ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
创建所需要的目录
mkdir -p /u02/flash_recovery_area
RMAN> restore controlfile from '/oraclebak/ctl_file_fus3mu79_1_1_20170508';
Starting restore at 12-MAY-17
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/u02/oradata/xezf/control01.ctl
output file name=/u02/oradata/xezf/control02.ctl
output file name=/u02/oradata/xezf/control03.ctl
Finished restore at 12-MAY-17
RMAN> startup mount;
database is already started
database mounted
released channel: ORA_DISK_1
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
restore database;
recover database until scn 14373193436;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
查看各数据文件scn号是否一致
SQL> select distinct to_char(checkpoint_change#) from v$datafile a ;
TO_CHAR(CHECKPOINT_CHANGE#)
----------------------------------------
14373193440
RMAN> alter database open;
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 05/14/2017 12:09:03
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
SQL> startup upgrade;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 1.7103E+10 bytes
Fixed Size 2220200 bytes
Variable Size 2281705304 bytes
Database Buffers 1.4764E+10 bytes
Redo Buffers 55287808 bytes
Database mounted.
Database opened.
实例名必须相同。
目录最好相同,按原pfile里的有的目录创建
查询原数据库dbid
select dbid from v$database;
RMAN> set dbid=844174343
executing command: SET DBID
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/oracle/db/dbs/initxezf.ora'
starting Oracle instance without parameter file for retrieval of spfile
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 05/12/2017 11:38:58
RMAN-04014: startup failed: ORA-04031: unable to allocate 3978656 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","FileOpenBlock")
原服务器scp 一份spfile或者pfile到新服务器
RMAN> startup nomount
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 05/12/2017 11:48:38
RMAN-04014: startup failed: ORA-16032: parameter LOG_ARCHIVE_DEST_1 destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory
RMAN-04017: startup error description: ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
创建所需要的目录
mkdir -p /u02/flash_recovery_area
RMAN> restore controlfile from '/oraclebak/ctl_file_fus3mu79_1_1_20170508';
Starting restore at 12-MAY-17
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/u02/oradata/xezf/control01.ctl
output file name=/u02/oradata/xezf/control02.ctl
output file name=/u02/oradata/xezf/control03.ctl
Finished restore at 12-MAY-17
RMAN> startup mount;
database is already started
database mounted
released channel: ORA_DISK_1
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
restore database;
recover database until scn 14373193436;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
查看各数据文件scn号是否一致
SQL> select distinct to_char(checkpoint_change#) from v$datafile a ;
TO_CHAR(CHECKPOINT_CHANGE#)
----------------------------------------
14373193440
RMAN> alter database open;
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 05/14/2017 12:09:03
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
SQL> startup upgrade;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 1.7103E+10 bytes
Fixed Size 2220200 bytes
Variable Size 2281705304 bytes
Database Buffers 1.4764E+10 bytes
Redo Buffers 55287808 bytes
Database mounted.
Database opened.
0 0
- oracle 异库恢复
- Oracle 异机恢复
- Oracle rman异机恢复
- oracle rman异机恢复
- ORACLE RMAN异机恢复
- Oracle异机恢复处理
- oracle恢复
- 恢复oracle
- rman恢复方案和oracle异机恢复
- Oracle备份/恢复案例03--全库恢复
- Oracle恢复(六)------RMAN整库恢复
- NBU SAN 异机恢复ORACLE
- oracle异目录自动恢复(bakbone netvault)
- 用TSM在异机恢复Oracle
- 121231异机恢复oracle数据库
- Oracle rman备份异机恢复
- Oracle rman备份异机恢复
- 一次Oracle异机恢复操作记录
- centos7安装openvswitch虚拟交换机
- 位置和传感器:位置策略
- expdp中出现的错误
- java中的关键字和标识符
- 使用Docker搭建consul集群+registrator实现服务自动注册。
- oracle 异库恢复
- 关于用 mui框架a标签不跳转问题
- Oracle 11g中CLOB字段类型的数据读取
- js实现文字向上无缝滚动
- 使用weave实现跨主机docker容器互联
- Waiting in Line
- hdu 5898 odd-even number 数位dp基础
- 冒泡排序(从小到大)
- JAVA学习笔记(Eclipse常用功能)