Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

73

积分

0

好友

0

主题
1#
发表于 2011-12-1 19:02:15 | 查看: 17259| 回复: 31
环境  AIX 6.1  RAC  ORACLE Release 11.2.0.1.0  ASM

dataguard 环境

AIX 6.1   ORACLE Release 11.2.0.1.0



Trace file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/oraclehome/app/oracle/product/11.2.0/dbhome_1
System name: AIX
Node name: ibmdb3
Release: 1
Version: 6
Machine: 00CAEDC64C00
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 22
Unix process pid: 7340230, image: [email=oracle@ibmdb3]oracle@ibmdb3[/email] (ARC2)

*** 2011-12-01 18:12:44.826
*** SESSION ID:(129.1) 2011-12-01 18:12:44.826
*** CLIENT ID:() 2011-12-01 18:12:44.826
*** SERVICE NAME:() 2011-12-01 18:12:44.826
*** MODULE NAME:() 2011-12-01 18:12:44.826
*** ACTION NAME:() 2011-12-01 18:12:44.826

Redo shipping client performing standby login
OCISessionBegin failed. Error -1


Thu Dec 01 18:15:44 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_pr00_9306160.trc  (incident=8425):
ORA-00600: internal error code, arguments: [723], [120224], [13472944], [memory leak], [], [], [], [], [], [], [], []
Incident details in: /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/incident/incdir_8425/orcl_pr00_9306160_i8425.trc
Thu Dec 01 18:17:44 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc:
ORA-16009: invalid redo transport destination
PING[ARC2]: Heartbeat failed to connect to standby 'orcl1'. Error is 16009.
Thu Dec 01 18:22:44 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc:
ORA-16009: invalid redo transport destination
PING[ARC2]: Heartbeat failed to connect to standby 'orcl1'. Error is 16009.
Thu Dec 01 18:27:44 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc:
ORA-16009: invalid redo transport destination
PING[ARC2]: Heartbeat failed to connect to standby 'orcl1'. Error is 16009.
Thu Dec 01 18:32:45 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc:
ORA-16009: invalid redo transport destination
PING[ARC2]: Heartbeat failed to connect to standby 'orcl1'. Error is 16009.
Thu Dec 01 18:37:45 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc:
ORA-16009: invalid redo transport destination
PING[ARC2]: Heartbeat failed to connect to standby 'orcl1'. Error is 16009.
Thu Dec 01 18:42:45 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc:
ORA-16009: invalid redo transport destination
PING[ARC2]: Heartbeat failed to connect to standby 'orcl1'. Error is 16009.
Thu Dec 01 18:47:45 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc:
ORA-16009: invalid redo transport destination
PING[ARC2]: Heartbeat failed to connect to standby 'orcl1'. Error is 16009.
Thu Dec 01 18:52:45 2011
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_arc2_7340230.trc:
ORA-16009: invalid redo transport destination
PING[ARC2]: Heartbeat failed to connect to standby 'orcl1'. Error is 16009.
32#
发表于 2011-12-2 22:38:39
那我数据库需要做什么  怎么把数据文件,归档文件转移到存储上

回复 只看该作者 道具 举报

31#
发表于 2011-12-2 22:37:33
我的卓见是 :

1. 搞清楚你的现状 不要糊里糊涂地做事情
2. 如果实在无法搞清 那么请厂商的人员来操作

回复 只看该作者 道具 举报

30#
发表于 2011-12-2 22:34:47
ML 有什么卓见  谢谢

回复 只看该作者 道具 举报

29#
发表于 2011-12-2 22:34:24
是的 搞不清  存储这块  因为现在的数据文件 归档文件都是存储在本地的磁盘上  现在服务器挂了个裸设备(容量4.5T)

想把他转移到裸设备上

回复 只看该作者 道具 举报

28#
发表于 2011-12-2 22:32:45
"因为现在的存储还是裸设备 改成jfs2文件系统"

"现在的裸设备还没用到"

"我不懂存储这块 所以就跟存储的工程师 说用普通的文件系统(jfs2)"

我想你已经搞不清楚什么是什么了

回复 只看该作者 道具 举报

27#
发表于 2011-12-2 22:31:22
我不懂存储这块 所以就跟存储的工程师 说用普通的文件系统(jfs2)

回复 只看该作者 道具 举报

26#
发表于 2011-12-2 22:30:42
现在的裸设备还没用到

回复 只看该作者 道具 举报

25#
发表于 2011-12-2 22:30:02

回复 24# 的帖子

*.db_file_name_convert='+DB/orcl/datafile/','/u01/oraclehome/app/oracle/oradata/orcl/datafile','+DB/orcl/tempfile/','/u01/oraclehome/app/oracle/oradata/orcl/tempfile','+DB/orcl/','/u01/oraclehome/app/oracle/oradata/orcl/datafile'

就DB_FILE_NAME_CONVERT来看 你的Primary使用的是 ASM, 而standby使用的是文件系统

裸设备是哪里来的?

回复 只看该作者 道具 举报

24#
发表于 2011-12-2 22:27:40
因为现在的存储还是裸设备 改成jfs2文件系统

回复 只看该作者 道具 举报

23#
发表于 2011-12-2 22:25:30

回复 22# 的帖子

你的存储是指什么? 提问的艺术

回复 只看该作者 道具 举报

22#
发表于 2011-12-2 22:21:14
想把数据文件 归档文件 日志文件改成到存储上怎么弄

回复 只看该作者 道具 举报

21#
发表于 2011-12-2 22:20:16
我的已经可以了  现在就是想把数据文件改成到存储上 怎么弄ML

回复 只看该作者 道具 举报

20#
发表于 2011-12-2 16:34:44
顺便说一句 你不觉得用代码模式贴日志后操作步骤 看起来更舒服吗?

回复 只看该作者 道具 举报

19#
发表于 2011-12-2 16:34:12
1.收集下诊断信息:http://www.oracledatabase12g.com ... ic-information.html

分别在Primary和physical standby 上运行对应部分的脚本


2. 可以考虑手工传输601 日志到standby 上apply,解决该gap后 继续观察该问题

回复 只看该作者 道具 举报

18#
发表于 2011-12-2 15:45:53
这个归档是有的 ML

回复 只看该作者 道具 举报

17#
发表于 2011-12-2 15:45:23
bmdb1:/tmp/arch$>ls -a
.                    1_590_764887532.dbf  1_599_764887532.dbf  1_608_764887532.dbf  1_617_764887532.dbf  1_626_764887532.dbf  1_635_764887532.dbf
..                   1_591_764887532.dbf  1_600_764887532.dbf  1_609_764887532.dbf  1_618_764887532.dbf  1_627_764887532.dbf  1_636_764887532.dbf
1_583_764887532.dbf  1_592_764887532.dbf  1_601_764887532.dbf  1_610_764887532.dbf  1_619_764887532.dbf  1_628_764887532.dbf  1_637_764887532.dbf
1_584_764887532.dbf  1_593_764887532.dbf  1_602_764887532.dbf  1_611_764887532.dbf  1_620_764887532.dbf  1_629_764887532.dbf  1_638_764887532.dbf
1_585_764887532.dbf  1_594_764887532.dbf  1_603_764887532.dbf  1_612_764887532.dbf  1_621_764887532.dbf  1_630_764887532.dbf  orcl1pfile
1_586_764887532.dbf  1_595_764887532.dbf  1_604_764887532.dbf  1_613_764887532.dbf  1_622_764887532.dbf  1_631_764887532.dbf
1_587_764887532.dbf  1_596_764887532.dbf  1_605_764887532.dbf  1_614_764887532.dbf  1_623_764887532.dbf  1_632_764887532.dbf
1_588_764887532.dbf  1_597_764887532.dbf  1_606_764887532.dbf  1_615_764887532.dbf  1_624_764887532.dbf  1_633_764887532.dbf
1_589_764887532.dbf  1_598_764887532.dbf  1_607_764887532.dbf  1_616_764887532.dbf  1_625_764887532.dbf  1_634_764887532.dbf
ibmdb1:/tmp/arch$>
ᅮ￉ᄆᄒᄉ￘ᅬ솨쀠ᅰᅱ쫘?ᅡ￧￁ᆲ푸ᄀᆪ

回复 只看该作者 道具 举报

16#
发表于 2011-12-2 15:31:16
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 601-601

确认Primary上 Sequence = 601 的archivelog 存在

回复 只看该作者 道具 举报

15#
发表于 2011-12-2 15:24:23
“现在报不能打开文件的错误解决了”,是如何解决的?

回复 只看该作者 道具 举报

14#
发表于 2011-12-2 15:23:54
现在报不能打开文件的错误解决了


managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 4 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Waiting for thread 1 sequence 601
Fetching gap sequence in thread 1, gap sequence 601-601
Completed: alter database recover managed standby database disconnect from session
Fri Dec 02 15:19:58 2011
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 601-601
DBID 1292668266 branch 764887532
FAL[client]: All defined FAL servers have been attempted.
-------------------------------------------------------------
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
-------------------------------------------------------------

回复 只看该作者 道具 举报

13#
发表于 2011-12-2 15:11:12
。。。。贴日志请用代码模式,这个说了很多次了
  1. ls -ld /u01/oraclehome/app/oracle/oradata/orcl/datafile
  2. ls -l  /u01/oraclehome/app/oracle/oradata/orcl/datafile/*
复制代码

回复 只看该作者 道具 举报

12#
发表于 2011-12-2 15:00:59
现在是把主库的日志创建了

但是还是报那个错误

Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 4 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_11927688.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.353.764887533'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_11927688.trc:
ORA-00367: checksum error in log file header
ORA-00316: log 1 of thread 1, type 0 in header is not log file
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.331.764887533'
Clearing online redo logfile 1 /u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.331.764887533
Clearing online log 1 of thread 1 sequence number 0
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_11927688.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.353.764887533'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3



Trace file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_11927688.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/oraclehome/app/oracle/product/11.2.0/dbhome_1
System name:  AIX
Node name:  ibmdb3
Release:  1
Version:  6
Machine:  00CAEDC64C00
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 24
Unix process pid: 11927688, image: oracle@ibmdb3 (MRP0)


*** 2011-12-02 14:47:34.090
*** SESSION ID:(6.9) 2011-12-02 14:47:34.090
*** CLIENT ID:() 2011-12-02 14:47:34.090
*** SERVICE NAME:() 2011-12-02 14:47:34.090
*** MODULE NAME:() 2011-12-02 14:47:34.090
*** ACTION NAME:() 2011-12-02 14:47:34.090

*** 2011-12-02 14:47:34.077 4132 krsh.c
MRP0: Background Managed Standby Recovery process started

*** 2011-12-02 14:47:39.091
*** 2011-12-02 14:47:39.091 1266 krsm.c
Managed Recovery: Initialization posted.

*** 2011-12-02 14:47:40.133
Successfully allocated 4 recovery slaves
Parallel Media Recovery started with 4 slaves

*** 2011-12-02 14:47:40.613
*** 2011-12-02 14:47:40.613 1266 krsm.c
Managed Recovery: Active posted.
*** 2011-12-02 14:47:40.613 2938 krsq.c
Waiting for all non-current ORLs to be archived...
*** 2011-12-02 14:47:40.614 3020 krsq.c
All non-current ORLs have been archived.
DDE rules only execution for: ORA 312
----- START Event Driven Actions Dump ----
---- END Event Driven Actions Dump ----
----- START DDE Actions Dump -----
Executing SYNC actions
----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
DDE Action 'DB_STRUCTURE_INTEGRITY_CHECK' was flood controlled
----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (FLOOD CONTROLLED, 1 csec) -----
Executing ASYNC actions
----- END DDE Actions Dump (total 0 csec) -----
DDE rules only execution for: ORA 313
----- START Event Driven Actions Dump ----
---- END Event Driven Actions Dump ----
----- START DDE Actions Dump -----
Executing SYNC actions
----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
DDE Action 'DB_STRUCTURE_INTEGRITY_CHECK' was flood controlled
----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (FLOOD CONTROLLED, 1 csec) -----
Executing ASYNC actions
----- END DDE Actions Dump (total 0 csec) -----
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.353.764887533'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
DDE: Problem Key 'ORA 312' was flood controlled (0x1) (no incident)
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.331.764887533'
ORA-00367: checksum error in log file header
ORA-00316: log 1 of thread 1, type 0 in header is not log file
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.331.764887533'
*** 2011-12-02 14:47:40.616 4132 krsh.c
Clearing online redo logfile 1 /u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.331.764887533
DDE: Problem Key 'ORA 312' was flood controlled (0x1) (no incident)
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/datafile/group_1.353.764887533'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3

回复 只看该作者 道具 举报

11#
发表于 2011-12-2 14:34:35
ORA-00344: unable to re-create online log ' u01/oraclehome/app/oracle/oradata/orcl/onlinelog/group_1.353.764887533'


*.LOG_FILE_NAME_CONVERT='+DB/orcl/onlinelog/','/u01/oraclehome/app/oracle/oradata/orcl/onlinelog','+DB/orcl/onlinelog/','u01/oraclehome/app/oracle/oradata/orcl/onlinelog'



仔细看红字部分,LOG_FILE_NAME_CONVERT设置有误

回复 只看该作者 道具 举报

10#
发表于 2011-12-2 10:22:52
现在那个BUG 没了

现在这个有问题

Additional information: 3
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_10551462.trc:
ORA-00367: checksum error in log file header
ORA-00316: log 1 of thread 1, type 0 in header is not log file
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/onlinelog/group_1.331.764887533'
Clearing online redo logfile 1 /u01/oraclehome/app/oracle/oradata/orcl/onlinelog/group_1.331.764887533
Clearing online log 1 of thread 1 sequence number 0
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_10551462.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: ' u01/oraclehome/app/oracle/oradata/orcl/onlinelog/group_1.353.764887533'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_10551462.trc:
ORA-00367: checksum error in log file header
ORA-00316: log 1 of thread 1, type 0 in header is not log file
ORA-00312: online log 1 thread 1: '/u01/oraclehome/app/oracle/oradata/orcl/onlinelog/group_1.331.764887533'
Completed: alter database recover managed standby database disconnect from session
Errors in file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_10551462.trc:
ORA-00344: unable to re-create online log ' u01/oraclehome/app/oracle/oradata/orcl/onlinelog/group_1.353.764887533'
ORA-27040: file create error, unable to create file
IBM AIX RISC System/6000 Error: 2: No such file or directory
Clearing online redo logfile 1 complete
Media Recovery Waiting for thread 1 sequence 601
Fetching gap sequence in thread 1, gap sequence 601-601
Fri Dec 02 10:18:56 2011
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 601-601
DBID 1292668266 branch 764887532
FAL[client]: All defined FAL servers have been attempted.
-------------------------------------------------------------
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
-------------------------------------------------------------

回复 只看该作者 道具 举报

9#
发表于 2011-12-1 22:16:50
你好,请以代码形式贴出该ORA-00600相关的stack call ,以及以下输出


#collect AIX info

ls -al $ORACLE_HOME/bin/oracle >> /tmp/support.txt
oslevel -s
whoami >> /tmp/support.txt
ulimit -a >> /tmp/support.txt
svmon -O unit=MB >> /tmp/support.txt
/usr/sbin/lsps -a >> /tmp/support.txt
/usr/sbin/lsattr -HE -l sys0 -a realmem >> /tmp/support.txt
ipcs -m >> /tmp/support.txt

opatch lsinventory -detail

回复 只看该作者 道具 举报

8#
发表于 2011-12-1 22:12:43
Dump file /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/incident/incdir_14441/orcl_pr00_3014730_i14441.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/oraclehome/app/oracle/product/11.2.0/dbhome_1
System name:  AIX
Node name:  ibmdb3
Release:  1
Version:  6
Machine:  00CAEDC64C00
Instance name: orcl
Redo thread mounted by this instance: 0 <none>
Oracle process number: 0
Unix process pid: 3014730, image: oracle@ibmdb3 (PR00)


*** 2011-12-01 21:47:25.865
Dump continued from file: /u01/oraclehome/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_pr00_3014730.trc
ORA-00600: internal error code, arguments: [723], [120224], [13472944], [memory leak], [], [], [], [], [], [], [], []

========= Dump for incident 14441 (ORA 600 [723]) ========
----- Beginning of Customized Incident Dump(s) -----
******** ERROR: PGA memory leak detected 13472944 > 120224 ********
******************************************************
HEAP DUMP heap name="pga heap"  desc=110018ed0
extent sz=0x20c0 alt=216 het=32767 rec=0 flg=3 opc=3
parent=0 owner=0 nex=0 xsz=0x1fff0 heap=0

回复 只看该作者 道具 举报

7#
发表于 2011-12-1 21:14:04
*.fal_client='orcl'
*.fal_server='orcl1','orcl2'

备库的fal_client 设置可能存在问题


参考文档ORA-16009 reported on primary [ID 1193334.1]

Applies to:  Oracle Server - Enterprise Edition - Version: 10.2.0.4 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.
Symptoms--- primary ----

log_archive_dest_2             service=stndby LGWR  

fal_client  =                      prtp         ### connects to self from primary server, intended for role transition
fal_server =                     stndby      ### connects to standby, intended for role transition

Caution:- Primary's tnsnames.ora has a alias "prtp" that lets you connect to itself



Sat Aug 28 00:01:45 2010
ARC1: LGWR is actively archiving destination LOG_ARCHIVE_DEST_2
ARC1: Standby redo logfile selected for thread 1 sequence 24565 for destination LOG_ARCHIVE_DEST_2
Sat Aug 28 00:01:48 2010
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
Using STANDBY_ARCHIVE_DEST parameter default value as /archive/archive-log/
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 3634
RFS[1]: Not using real application clusters
Sat Aug 28 00:01:49 2010
Errors in file /oracle/admin/prtp/udump/prtp_rfs_3634.trc:
ORA-16009: remote archive log destination must be a STANDBY database
Sat Aug 28 00:01:49 2010
Errors in file /oracle/admin/prtp/bdump/prtp_arc0_29429.trc:
ORA-16009: remote archive log destination must be a STANDBY database
Sat Aug 28 00:01:49 2010


---- standby ---

fal_client               = prtp         ### connects to self from standby server
fal_server               = stndby   ### connects to primary from standby server


Fri Aug 27 23:33:13 2010
Media Recovery Waiting for thread 1 sequence 24563
Sat Aug 28 00:01:45 2010
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[10]: Assigned to RFS process 24687
RFS[10]: Identified database type as 'physical standby'
Primary database is in MAXIMUM PERFORMANCE mode
Primary database is in MAXIMUM PERFORMANCE mode
RFS[10]: Successfully opened standby log 9: '/oradata1/prtp/redo-log/redo9_1.log'
Sat Aug 28 00:01:45 2010
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[11]: Assigned to RFS process 24689
RFS[11]: Identified database type as 'physical standby'
RFS[11]: Successfully opened standby log 10: '/oradata1/prtp/redo-log/redo10_1.log'
Sat Aug 28 00:01:48 2010
Fetching gap sequence in thread 1, gap sequence 24563-24564
Sat Aug 28 00:02:01 2010
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[12]: Assigned to RFS process 24692
RFS[12]: Identified database type as 'physical standby'
RFS[12]: Archived Log: '/archive/archive-log/arc_1_24563_706389032.arc'
Sat Aug 28 00:02:08 2010CauseWhen the archive gap needs to be resolved, standby connects to primary using  an alias defined for fal_server parameter along with just carring the value given for fal_client parameter.

fal server, here the primary, receives the fal_client value from standby and searches its own tnsnames.ora

Once the primary is able to connect to standby, it services the GAP request received from standby

In effect standby's fal client alias should have been defined in primary's tnsnames.ora

But for this case, primary's tnsnames.ora had a alias "prtp", but it points to primary itself
so consequently we report ORA-16009

There could be other incidents like standby's log_archive_dest_n parameter has a valid_for attribute
set to all_roles,all_logfiles. Actaully log_archive_dest_n is meant for role transition

Solution
We always recommend to have standby's fal_client value to be identical as primary's log_archive_dest_n (n takes 2 that points to standby)
This will aovid any confusion.

Current setting

--- primary ---

log_archive_dest_2             service=stndby LGWR  

--- standby ---

fal_client               = prtp        ### connects to self from standby server
fal_server               = stndby  ### connects to primary from standby server

Proposed settting

--- primary ---

log_archive_dest_2             service=stndby LGWR  

--- standby ---

fal_client               = stndby      ### connects to self from standby server
fal_server               = stndby    ### connects to primary from standby server

or

alter sytem set fal_client='stndby' scope=both sid='*';   ## dynamic parameter

In a nutshell, primary's log_archive_dest_2 and standby's fal_client takes identical tnsalias.
Same way you can prepare for role reversal


For better understanding about FAL mechanism, refer Note.232649.1


Basically we do not recommend to have the same TNS-Alias on both Sites resolving different Databases as this mostly leads into ORA-16009. So to make it clear it should be as follows for Example:

- Primary Database called 'DB1'
- Standby Database called 'DB2'

So you should have a TNS-Alias 'DB1' on both Sites resolving Database 'DB1' and a TNS.Alias 'DB2' on both Sites resolving Database 'DB2'. Then you can set on the Primary Database (DB1):

log_archive_dest_n='service=db2 .... db_unique_name=db2 valid_for=(ONLINE_LOGFILES, PRIMARY_ROLE)'
fal_server='DB2'
fal_client='DB1'

and on the Standby Database (DB2):

log_archive_dest_n='service=db1 .... db_unique_name=db1 valid_for=(ONLINE_LOGFILES, PRIMARY_ROLE)'
fal_server='DB1'
fal_client='DB2'

Bug 4676659  ORA-16009 in alert log with standby and LGWR ASYNC
This note gives a brief overview of bug 4676659.
The content was last updated on: 03-APR-2008
Click here for details of each of the sections below.
Affects:

    Product (Component)    Oracle Server (Rdbms)
    Range of versions believed to be affected    Versions >= 10.2 but < 11
    Versions confirmed as being affected   

        10.2.0.2

    Platforms affected    Generic (all / most platforms affected)

Fixed:

    This issue is fixed in   

        10.2.0.3 (Server Patch Set)
        11.1.0.6 (Base Release)

Symptoms:
   
Related To:

    Error May Occur
    ORA-16009

   

    Physical Standby Database / Dataguard

Description

    Standby may not be recognised (ORA-16009)
    When the log transport is LGWR ASYNC and logical standby has
    LOG_ARCHIVE_DEST setting VALID_FOR=(ONLINE_LOGFILE, PRIMARY_ROLE),
    ORA-16009 is reported at both primary and standby alert.log at
    regular intervals.

    Workaround:
      There is no workaround to prevent ORA-16009 from appearing in alert logs.
      However, even though there are errors in alert log no functionality is
      lost.

回复 只看该作者 道具 举报

6#
发表于 2011-12-1 20:17:08
1、standby logfile是否存在
2、备库/tmp/arch目录是否存在

回复 只看该作者 道具 举报

5#
发表于 2011-12-1 19:36:20
主库

# tnsnames.ora Network Configuration File: /u01/oraclehome/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

orcl1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.19.81)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      (INSTANCE_NAME = orcl1)
    )
  )

orcl2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.19.83)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      (INSTANCE_NAME = orcl2)
    )
  )



ORCLDG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.15.61)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

初始化参数

orcl2.__db_cache_size=1040187392
orcl1.__db_cache_size=838860800
orcl2.__java_pool_size=67108864
orcl1.__java_pool_size=67108864
orcl2.__large_pool_size=16777216
orcl1.__large_pool_size=16777216
orcl1.__oracle_base='/u01/oraclehome/app/oracle'#ORACLE_BASE set from environment
orcl2.__oracle_base='/u01/oraclehome/app/oracle'#ORACLE_BASE set from environment
orcl2.__pga_aggregate_target=5217714176
orcl1.__pga_aggregate_target=5217714176
orcl2.__sga_target=2936012800
orcl1.__sga_target=2936012800
orcl2.__shared_io_pool_size=0
orcl1.__shared_io_pool_size=0
orcl2.__shared_pool_size=1761607680
orcl1.__shared_pool_size=1962934272
orcl2.__streams_pool_size=0
orcl1.__streams_pool_size=0
*.audit_file_dest='/u01/oraclehome/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.cluster_database=TRUE
*.compatible='11.2.0.0.0'
*.control_files='+DB/orcl/controlfile/current.330.764887531','+FRA/orcl/controlfile/current.352.764887531'
*.db_block_size=8192
*.db_create_file_dest='+DB'
*.db_domain=''
*.db_file_name_convert='+DB/orcl/datafile/','/u01/oraclehome/app/oracle/oradata/orcl/datafile','+DB/orcl/tempfile/','/u01/oraclehome/app/oracle/oradata/orcl/tempfile','+DB/orcl/','/u01/oraclehome/app/oracle/oradata/orcl/datafile'
*.db_name='orcl'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=4039114752
*.diagnostic_dest='/u01/oraclehome/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.fal_client='ORCL'
*.fal_server='ORCLDG'
orcl1.instance_number=1
orcl2.instance_number=2
orcl1.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.19.82)(PORT=1521))))'
orcl2.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.19.84)(PORT=1521))))'
*.log_archive_config='DG_CONFIG=(orcl,orcldg)'
*.log_archive_dest_1='LOCATION=/tmp/arch/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl'
*.log_archive_dest_2='SERVICE=orcldg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcldg'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_file_name_convert='+DB/orcl/onlinelog/','/u01/oraclehome/app/oracle/oradata/orcl/onlinelog','+DB/orcl/onlinelog/','/u01/oraclehome/app/oracle/oradata/orcl/onlinelog'
*.memory_target=8146386944
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.processes=730
*.remote_listener='scan:1521'
*.remote_login_passwordfile='exclusive'
*.sessions=800
*.standby_file_management='AUTO'
orcl2.thread=2
orcl1.thread=1
orcl2.undo_tablespace='UNDOTBS2'
orcl1.undo_tablespace='UNDOTBS1'


备库

# tnsnames.ora Network Configuration File: /u01/oraclehome/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

orcl1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.19.81)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      (INSTANCE_NAME = orcl1)
    )
  )

orcl2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.19.83)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      (INSTANCE_NAME = orcl2)
    )
  )



ORCLDG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.15.61)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )


*.audit_file_dest='/u01/oraclehome/app/oracle/admin/orcl/adump'
*.background_dump_dest='/u01/oraclehome/app/oracle/admin/orcl/bdump'
*.control_files='/u01/oraclehome/app/oracle/oradata/orcl/datafile/control01.ctl','/u01/oraclehome/app/oracle/oradata/orcl/datafile/control02.ctl','/u01/oraclehome/app/oracle/oradata/orcl/datafile/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/orcl/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='+DB/orcl/datafile/','/u01/oraclehome/app/oracle/oradata/orcl/datafile','+DB/orcl/tempfile/','/u01/oraclehome/app/oracle/oradata/orcl/tempfile','+DB/orcl/','/u01/oraclehome/app/oracle/oradata/orcl/datafile'
*.db_name='orcl'
*.db_unique_name='orcldg'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.fal_client='orcl'
*.fal_server='orcl1','orcl2'
*.job_queue_processes=10
*.log_archive_config='dg_config=(orcl,orcldg)'
*.log_archive_dest_1='LOCATION=/tmp/arch'
*.log_archive_dest_2='service=orcl1 VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=orcl'
*.log_archive_dest_state_2='ENABLE'
*.LOG_FILE_NAME_CONVERT='+DB/orcl/onlinelog/','/u01/oraclehome/app/oracle/oradata/orcl/onlinelog','+DB/orcl/onlinelog/','u01/oraclehome/app/oracle/oradata/orcl/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=59768832
*.processes=150
*.remote_login_passwordfile='exclusive'
*.sga_target=179306496
*.standby_archive_dest='/tmp/arch'
*.standby_file_management='auto'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/oraclehome/app/oracle/admin/orcl/udump'

回复 只看该作者 道具 举报

4#
发表于 2011-12-1 19:10:20
starting media recovery

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/01/2011 15:36:51
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of archived log for thread 2 with sequence 531 and starting SCN of 64101832 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 530 and starting SCN of 64085951 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 529 and starting SCN of 63978520 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 528 and starting SCN of 63928230 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 527 and starting SCN of 63813640 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 526 and starting SCN of 63711135 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 525 and starting SCN of 63709792 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 524 and starting SCN of 63702084 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 608 and starting SCN of 64101749 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 607 and starting SCN of 64087388 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 606 and starting SCN of 63978454 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 605 and starting SCN of 63890363 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 604 and starting SCN of 63793884 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 603 and starting SCN of 63711244 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 602 and starting SCN of 63709789 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 601 and starting SCN of 63702080 found to restore


先前在还原备库的时候出现的错误

回复 只看该作者 道具 举报

3#
发表于 2011-12-1 19:04:16
16009, 00000, "remote archive log destination must be a STANDBY database"
// *Cause:  The database associated with the archive log destination service
//          name is other than the required STANDBY type database.
//          Remote archival of redo log files is not allowed to non-STANDBY
//          database instances.
// *Action: Take the necessary steps to create the required compatible STANDBY
//          database before retrying the ARCHIVE LOG processing.

回复 只看该作者 道具 举报

2#
发表于 2011-12-1 19:02:39
在同步的时候出现的错误

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-24 00:30 , Processed in 0.055354 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569