Oracle 11g如何将dataguard的主库数据恢复到Oracle单机(3)

可见,出先此错误的原因是恢复需要的归档日志记录在控制文件或恢复目录中找不到。解决方法分两种情况:
1.如果相关的日志存在且可用的话,就将此日志记录添加到控制文件或恢复目录中。
2.如果相关的日志已经被删除了或不可用了,那么就按照错误的提示scn将数据库恢复到此scn,这里是11688009482。也就是说此时数据库只能进行不完全恢复了,在打开数据库时得使用resetlogs打开。

这里就只恢复到11688009482这个scn点为止:

recover database until scn 11688009482; RMAN> recover database until scn 11688009482; Starting recover at 26-NOV-15 using channel ORA_DISK_1 starting media recovery media recovery complete, elapsed time: 00:00:01 Finished recover at 26-NOV-15 RMAN> 6,打开数据库 RMAN> alter database open resetlogs; database opened RMAN>

修改密码

SQL> alter user orcstuk identified by "pd141287l118"; User altered. SQL> exit 7,远程连接报错 C:\Users\Administrator>tnsping TEST2_180.60 TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 26-NOV-2 015 21:59:33 Copyright (c) 1997, 2010, Oracle. All rights reserved. Used parameter files: D:\app\Administrator\product\11.2.0\client_2\network\admin\sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 12.18.10.6)(PORT = 1521))) (CONNECT_DATA = (SID = orcstu))) TNS-12535: TNS:operation timed out C:\Users\Administrator>

解���方案:关闭oracle数据库的防火墙。

8,取消dg设置成单机oracle

看到后台不停的报错日志:

Error 12154 received logging on to the standby Errors in file /oracle/app/oracle/diag/rdbms/pdunq/orcstu/trace/orcstu_arc2_13889.trc: ORA-12154: TNS:could not resolve the connect identifier specified PING[ARC2]: Heartbeat failed to connect to standby 'PD_DG'. Error is 12154. Thu Nov 26 22:48:02 2015 Error 12154 received logging on to the standby Errors in file /oracle/app/oracle/diag/rdbms/pdunq/orcstu/trace/orcstu_arc2_13889.trc: ORA-12154: TNS:could not resolve the connect identifier specified PING[ARC2]: Heartbeat failed to connect to standby 'PD_DG'. Error is 12154.

经过分析,是因为我的rman备份是从dg环境中的primary上获取的,备份的时候自然而然就带上了dg传输归档日志到standby的功能,所以将rman备份恢复到这台单机的时候,就会在dg归档日志传输的时候报错了,因为单机嘛。解决办法,关闭归档的日志传输,如下所示:

SQL> ALTER system SET log_archive_dest_state_2 ='defer'; System altered. SQL>

这样就停止了oracle dg归档日志传输,后台不会再报错了。

到此,迁移工作顺利圆满结束了。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/9478e6232080127c2f522a13024b5468.html