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

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

35

积分

0

好友

1

主题
1#
发表于 2012-5-13 21:15:27 | 查看: 7731| 回复: 2
Ver: oracle 11.2.0.1
os:  CentOS 6.0


logical standby  apply redo log时,出现大片报警:

LSP0: warning -- apply server 9, sid 103 waiting for event (since 621 seconds):
LSP0: warning -- apply server 4, sid 394 waiting for event (since 621 seconds):


log里打出来 很多上面的 警告,请教,这个是什么含义?

如何解决?

非常感谢!

[ 本帖最后由 tohjb 于 2012-5-13 21:24 编辑 ]
2#
发表于 2012-5-13 21:36:17
请上传 压缩后完整的 alert.log

并在logical standby上运行以下脚本,并上传结果
  1. - - - - - - - - - - - - - - - - Script begins here - - - - - - - - - - - - - - - -

  2. -- NAME: dg_lsby_diag.sql  (Run on LOGICAL STANDBY)
  3. -- ------------------------------------------------------------------------
  4. --    Copyright 2002, Oracle Corporation
  5. -- LAST UPDATED: 2/23/04
  6. --
  7. -- Usage: @dg_lsby_diag
  8. -- ------------------------------------------------------------------------
  9. -- PURPOSE:
  10. --    This script is to be used to assist in collection information to help
  11. --    troubeshoot Data Guard issues involving a Logical Standby.
  12. -- ------------------------------------------------------------------------
  13. -- DISCLAIMER:
  14. --    This script is provided for educational purposes only. It is NOT
  15. --    supported by Oracle World Wide Technical Support.
  16. --    The script has been tested and appears to work as intended.
  17. --    You should always run new scripts on a test instance initially.
  18. -- ------------------------------------------------------------------------
  19. -- Script output is as follows:

  20. set echo off
  21. set feedback off
  22. column timecol new_value timestamp
  23. column spool_extension new_value suffix
  24. select to_char(sysdate,'Mondd_hhmi') timecol,
  25. '.out' spool_extension from sys.dual;
  26. column output new_value dbname
  27. select value || '_' output
  28. from v$parameter where name = 'db_name';
  29. spool dg_lsby_diag_&&dbname&&timestamp&&suffix

  30. set linesize 79
  31. set pagesize 180
  32. set long 1000
  33. set trim on
  34. set trims on
  35. alter session set nls_date_format = 'MM/DD HH24:MI:SS';
  36. set feedback on
  37. select to_char(sysdate) time from dual;

  38. set echo on

  39. -- The following select will give us the generic information about how
  40. -- this standby is setup.  The database_role should be logical standby as
  41. -- that is what this script is intended to be ran on.

  42. column ROLE format a7 tru
  43. column NAME format a8 wrap
  44. select name,database_role,log_mode,protection_mode
  45. from v$database;

  46. -- ARCHIVER can be (STOPPED | STARTED | FAILED). FAILED means that the
  47. -- archiver failed to archive a log last time, but will try again within 5
  48. -- minutes. LOG_SWITCH_WAIT The ARCHIVE LOG/CLEAR LOG/CHECKPOINT event log
  49. -- switching is waiting for. Note that if ALTER SYSTEM SWITCH LOGFILE is
  50. -- hung, but there is room in the current online redo log, then value is
  51. -- NULL

  52. column host_name format a20 tru
  53. column version format a9 tru
  54. select instance_name,host_name,version,archiver,log_switch_wait
  55. from v$instance;

  56. -- The following query give us information about catpatch.
  57. -- This way we can tell if the procedure doesn't match the image.

  58. select version, modified, status from dba_registry
  59. where comp_id = 'CATPROC';

  60. -- Force logging and supplemental logging are not mandatory but are
  61. -- recommended if you plan to switchover.  During normal operations it is
  62. -- acceptable for SWITCHOVER_STATUS to be SESSIONS ACTIVE or NOT ALLOWED.

  63. column force_logging format a13 tru
  64. column remote_archive format a14 tru
  65. column dataguard_broker format a16 tru

  66. select force_logging,remote_archive,supplemental_log_data_pk,
  67. supplemental_log_data_ui,switchover_status,dataguard_broker
  68. from v$database;

  69. -- This query produces a list of all archive destinations.  It shows if
  70. -- they are enabled, what process is servicing that destination, if the
  71. -- destination is local or remote, and if remote what the current mount ID
  72. -- is.

  73. column destination format a35 wrap
  74. column process format a7
  75. column archiver format a8
  76. column ID format 99
  77. column mid format 99

  78. select dest_id "ID",destination,status,target,
  79. schedule,process,mountid  mid
  80. from v$archive_dest order by dest_id;

  81. -- This select will give further detail on the destinations as to what
  82. -- options have been set.  Register indicates whether or not the archived
  83. -- redo log is registered in the remote destination control file.

  84. set numwidth 8
  85. column ID format 99

  86. select dest_id "ID",archiver,transmit_mode,affirm,async_blocks async,
  87. net_timeout net_time,delay_mins delay,reopen_secs reopen,
  88. register,binding
  89. from v$archive_dest order by dest_id;

  90. -- Determine if any error conditions have been reached by querying the
  91. -- v$dataguard_status view (view only available in 9.2.0 and above):

  92. column message format a80

  93. select message, timestamp
  94. from v$dataguard_status
  95. where severity in ('Error','Fatal')
  96. order by timestamp;

  97. -- Query v$managed_standby to see the status of processes involved in
  98. -- the shipping redo on this system.  Does not include processes needed to
  99. -- apply redo.

  100. select process,status,client_process,sequence#
  101. from v$managed_standby;

  102. -- Verify that log apply services on the standby are currently
  103. -- running. If the query against V$LOGSTDBY returns no rows then logical
  104. -- apply is not running.

  105. column status format a50 wrap
  106. column type format a11
  107. set numwidth 15

  108. SELECT TYPE, STATUS, HIGH_SCN
  109. FROM V$LOGSTDBY;

  110. -- The DBA_LOGSTDBY_PROGRESS view describes the progress of SQL apply
  111. -- operations on the logical standby databases.  The APPLIED_SCN indicates
  112. -- that committed transactions at or below that SCN have been applied. The
  113. -- NEWEST_SCN is the maximum SCN to which data could be applied if no more
  114. -- logs were received. This is usually the MAX(NEXT_CHANGE#)-1 from
  115. -- DBA_LOGSTDBY_LOG.  When the value of NEWEST_SCN and APPLIED_SCN are the
  116. -- equal then all available changes have been applied.  If your
  117. -- APPLIED_SCN is below NEWEST_SCN and is increasing then SQL apply is
  118. -- currently processing changes.

  119. set numwidth 15

  120. select
  121. (case
  122. when newest_scn = applied_scn then 'Done'
  123. when newest_scn <= applied_scn + 9 then 'Done?'
  124. when newest_scn > (select max(next_change#) from dba_logstdby_log)
  125. then 'Near done'
  126. when (select count(*) from dba_logstdby_log
  127. where (next_change#, thread#) not in
  128. (select first_change#, thread# from dba_logstdby_log)) > 1
  129. then 'Gap'
  130. when newest_scn > applied_scn then 'Not Done'
  131. else '---' end) "Fin?",
  132. newest_scn, applied_scn, read_scn from dba_logstdby_progress;

  133. select newest_time, applied_time, read_time from dba_logstdby_progress;

  134. -- Determine if apply is lagging behind and by how much.  Missing
  135. -- sequence#'s in a range indicate that a gap exists.

  136. set numwidth 15
  137. column trd format 99

  138. select thread# trd, sequence#,
  139. first_change#, next_change#,
  140. dict_begin beg, dict_end end,
  141. to_char(timestamp, 'hh:mi:ss') timestamp,
  142. (case when l.next_change# < p.read_scn then 'YES'
  143. when l.first_change# < p.applied_scn then 'CURRENT'
  144. else 'NO' end) applied
  145. from dba_logstdby_log l, dba_logstdby_progress p
  146. order by thread#, first_change#;

  147. -- Get a history on logical standby apply activity.

  148. set numwidth 15

  149. select to_char(event_time, 'MM/DD HH24:MI:SS') time,
  150. commit_scn, current_scn, event, status
  151. from dba_logstdby_events
  152. order by event_time, commit_scn, current_scn;

  153. -- Dump logical standby stats

  154. column name format a40
  155. column value format a20

  156. select * from v$logstdby_stats;

  157. -- Dump logical standby parameters

  158. column name format a33 wrap
  159. column value format a33 wrap
  160. column type format 99

  161. select name, value, type from system.logstdby$parameters
  162. order by type, name;

  163. -- Gather log miner session and dictionary information.

  164. set numwidth 15

  165. select * from system.logmnr_session$;
  166. select * from system.logmnr_dictionary$;
  167. select * from system.logmnr_dictstate$;
  168. select * from v$logmnr_session;

  169. -- Query the log miner dictionary for key tables necessary to process
  170. -- changes for logical standby Label security will move AUD$ from SYS to
  171. -- SYSTEM.  A synonym will remain in SYS but Logical Standby does not
  172. -- support this.

  173. set numwidth 5
  174. column name format a9 wrap
  175. column owner format a6 wrap

  176. select o.logmnr_uid, o.obj#, o.objv#, u.name owner, o.name
  177. from system.logmnr_obj$ o, system.logmnr_user$ u
  178. where
  179. o.logmnr_uid = u.logmnr_uid and
  180. o.owner# = u.user# and
  181. o.name in ('JOB,'JOBSEQ','SEQ,'AUD,
  182. 'FGA_LOG,'IND,'COL,'LOGSTDBY$PARAMETER')
  183. order by u.name;

  184. -- Non-default init parameters.

  185. column name format a30 tru
  186. column value format a48 wra
  187. select name, value
  188. from v$parameter
  189. where isdefault = 'FALSE';

  190. spool off

  191. - - - - - - - - - - - - - - - -  Script ends here  - - - - - - - - - - - - - - - -
复制代码

回复 只看该作者 道具 举报

3#
发表于 2012-6-11 20:32:28
可能是跟业务有关系。
现在调整了业务的逻辑。 目前 log里没有发现这种信息了。

具体原因,还不太清楚。 当时的log已经不在了。

回复 只看该作者 道具 举报

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

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

GMT+8, 2024-11-15 21:45 , Processed in 0.051548 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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