加入收藏 | 设为首页 | 会员中心 | 我要投稿 衡阳站长网 (https://www.0734zz.cn/)- 数据集成、设备管理、备份、数据加密、智能搜索!
当前位置: 首页 > 站长百科 > 正文

oracle 11gamp;12c系统巡检

发布时间:2020-12-31 03:12:58 所属栏目:站长百科 来源:网络整理
导读:--脚本用法 sh performance_check.sh --脚本生成 vi performance_check.sh --添加如下 Ip=`` sqlplus -S "/ as sysdba" EOF -- |--------------------------------------------------------------------------------------| -- | Copyright (c) 1991-2013 or

-- +----------------------------------------------------------------------------+
-- | - REPORT HEADER - |
-- +----------------------------------------------------------------------------+
prompt <a name=top></a>
prompt &reportHeader

-- +----------------------------------------------------------------------------+
-- | - REPORT INDEX - |
-- +----------------------------------------------------------------------------+
prompt <a name="report_index"></a>

prompt <center><font size="+2" face="Arial,sans-serif" color="#336699"><b>Report Index</b></font><hr align="center" width="300"></center> -
<table width="90%" border="1"> -
<tr><th colspan="4">Application Regulation</th></tr> -
<tr> -
<td nowrap align="center" width="25%"><a class="link" href="#SCHEDULER_JOB">SCHEDULER JOB DETAILS</a></td> -
<td nowrap align="center" width="25%"><a class="link" href="#Parameter_name">Parameter name</a></td> -
<td nowrap align="center" width="25%"><a class="link" href="#Timezone">Timezone of db and session</a></td> -
<td nowrap align="center" width="25%"><a class="link" href="#SCHEDULER_STIME">SCHEDULER JOB STIME</a></td> -
</tr> -
<tr> -
<td nowrap align="center" width="25%"><a class="link" href="#Component_name">Component name</a></td> -
<td nowrap align="center" width="25%"><a class="link" href="#DBA_SCHEDULER_GLOBAL_ATTRIBUTE">DBA SCHEDULER GLOBAL ATTRIBUTE FOR OFF OR ON</a></td> -
<td nowrap align="center" width="25%"><a class="link" href="#"></a></td> -
<td nowrap align="center" width="25%"><a class="link" href="#"></a></td> -
<td nowrap align="center" width="25%"><a class="link" href="#"></a></td> -
</tr> -
</table>

prompt <p>
prompt <center><font size="+2" face="Arial,sans-serif" color="#663300"><b><u>Application regulation</u></b></font></center>


prompt <a name="SCHEDULER_JOB"></a>
prompt <font size="+2" face="Arial,sans-serif" color="#336699"><b>SCHEDULER JOB DETAILS</b></font><hr align="left" width="460">
SELECT T.ENABLED,T.STATE,T.JOB_NAME,T.START_DATE,T.END_DATE,T.LAST_RUN_DURATION,T.NEXT_RUN_DATE FROM DBA_SCHEDULER_JOBS T
WHERE T.OWNER=‘SSDBSP_001_000_000‘;
SELECT T.enabled,T.owner,T.program_name,T.program_type,T.program_action FROM DBA_SCHEDULER_PROGRAMS T WHERE T.OWNER=‘SSDBSP_001_000_000‘;
SELECT T.owner,T.schedule_name,T.schedule_type,T.repeat_interval FROM DBA_SCHEDULER_SCHEDULES T WHERE T.OWNER=‘SSDBSP_001_000_000‘;
SELECT T.owner,T.job_name,T.job_subname,T.ERROR#,T.STATUS,T.REQ_START_DATE,T.ACTUAL_START_DATE,T.RUN_DURATION FROM DBA_SCHEDULER_JOB_RUN_DETAILS T
WHERE T.OWNER=‘SSDBSP_001_000_000‘ and rownum<=20 ORDER BY T.ACTUAL_START_DATE DESC;
prompt <center>[<a class="noLink" href="#top">Top</a>]</center><p>

prompt <a name="Parameter_name"></a>
prompt <font size="+2" face="Arial,sans-serif" color="#336699"><b>Parameter name</b></font><hr align="left" width="460">
select count(*) as process_count from v$process;
select value as process_value from v$parameter where name = ‘processes‘;
select count(*) as session_count from v$session;
select value as session_value from v$parameter where name = ‘sessions‘;
select count(*) num_curs from v$open_cursor o,v$session s where o.sid=s.sid;
select t.NAME,t.VALUE,t.DISPLAY_VALUE,t.ISDEFAULT,t.ISDEPRECATED from v$parameter t where t.NAME like ‘%cursor%‘;
prompt <center>[<a class="noLink" href="#top">Top</a>]</center><p>

prompt <a name="Timezone"></a>
prompt <font size="+2" face="Arial,sans-serif" color="#336699"><b>Timezone of db and session</b></font><hr align="left" width="460">
select dbtimezone from dual;
select sessiontimezone from dual;
prompt <center>[<a class="noLink" href="#top">Top</a>]</center><p>

prompt <a name="SCHEDULER_STIME"></a>
prompt <font size="+2" face="Arial,sans-serif" color="#336699"><b>SCHEDULER JOB STIME</b></font><hr align="left" width="460">
select DBMS_SCHEDULER.STIME from dual;
prompt <center>[<a class="noLink" href="#top">Top</a>]</center><p>

(编辑:衡阳站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读