监控正在运行的rman过程-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 3502545
  • 博文数量: 718
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7790
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(718)

文章存档

2024年(4)

2023年(74)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客
相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: oracle

2021-11-11 20:55:28

如果怀疑rman性能问题

  1. rem -------------------------------
  2. rem script to monitor rman backup/restore operations
  3. rem to run from sqlplus: @monitor ''
  4. rem example:
  5. --sql>spool monitor.out
  6. --sql>@monitor 'yyyy-mm-dd 16:38:03'
  7. rem where <date> is the start time of your rman backup or restore job
  8. rem run monitor script periodically to confirm rman is progessing
  9. rem -------------------------------

  10. alter session set nls_date_format='dd-mon-rr hh24:mi:ss';
  11. set lines 1500
  12. set pages 100
  13. col cli_info format a10
  14. col spid format a5
  15. col ch format a20
  16. col seconds format 999999.99
  17. col filename format a65
  18. col bfc format 9
  19. col "% complete" format 999.99
  20. col event format a40
  21. set numwidth 10

  22. select sysdate from dual;

  23. rem gv$session_longops (channel level)

  24. prompt
  25. prompt channel progress - gv$session_longops:
  26. prompt
  27. select s.inst_id, o.sid, client_info ch, context, sofar, totalwork,
  28.                     round(sofar/totalwork*100,2) "% complete"
  29.      from gv$session_longops o, gv$session s
  30.      where opname like 'rman%'
  31.      and opname not like '%aggregate%'
  32.      and o.sid=s.sid
  33.      and totalwork != 0
  34.      and sofar <> totalwork;

  35. rem check wait events (rman sessions) - this is for current waits only
  36. rem use the following for 11g
  37. prompt
  38. prompt session progess - current wait events and time in wait so far:
  39. prompt
  40. select inst_id, sid, client_info ch, seq#, event, state, wait_time_micro/1000000 seconds
  41. from gv$session where program like '%rman%' and
  42. wait_time = 0 and
  43. not action is null;

  44. rem use the following for 10g
  45. --select inst_id, sid, client_info ch, seq#, event, state, seconds_in_wait secs
  46. --from gv$session where program like '%rman%' and
  47. --wait_time = 0 and
  48. --not action is null;

  49. rem gv$backup_async_io
  50. prompt
  51. prompt disk (file and backuppiece) progress - includes tape backuppiece
  52. prompt if backup_tape_io_slaves=true:
  53. prompt
  54. select s.inst_id, a.sid, client_info ch, a.status,
  55. open_time, round(bytes/1024/1024,2) "sofar mb" , round(total_bytes/1024/1024,2)
  56. totmb, io_count,
  57. round(bytes/total_bytes*100,2) "% complete" , a.type, filename
  58. from gv$backup_async_io a, gv$session s
  59. where not a.status in ('unknown')
  60. and a.sid=s.sid and open_time > to_date('&1', 'yyyy-mm-dd hh24:mi:ss') order by 2,7;

  61. rem gv$backup_sync_io
  62. prompt
  63. prompt tape backuppiece progress (only if backup_tape_io_slaves=false):
  64. prompt
  65. select s.inst_id, a.sid, client_info ch, filename, a.type, a.status, buffer_size bsz, buffer_count bfc,
  66. open_time open, io_count
  67. from gv$backup_sync_io a, gv$session s
  68. where
  69. a.sid=s.sid and
  70. open_time > to_date('&1', 'yyyy-mm-dd hh24:mi:ss') ;
  71. rem -------------------------------


调用方法
sql> @mon '2021-11-11 20:30:00'
这个时间表示备份开始的大致时间即可,可多次执行。
阅读(807) | 评论(0) | 转发(0) |
0

上一篇:

下一篇:

给主人留下些什么吧!~~
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图