主页 > 云主机 > > 正文

大带宽_河南省建设厅网站_年度促销

来源:胜利云 发布时间:2021-12-31 08:19 标签:促销年度河南省网站带宽建设厅
浏览:

Hi Folks,

If you are running your shop on ORACLE database, monitoring/tracking count (& thus, volume/size) of archive log must be on top list.

As transaction activities (OLTP transactions or batch processing) increases, the amount of transaction logs also goes up. And, if it goes beyond the storage capacity of archive-log directory, your database may hit ‘archiver stuck’ situation. In addition, various questions may come on surface to be addressed – like

– available space for backup may get filled

– available bandwidth to ship archive logs to DR site (Disaster Recovery site) may come short (i.e. there may be delay in transferring archive log files from PRIMARY site to DR site)

– when did archive log generation was huge (this will help in tracing which background process to look for tuning)

In this document, i am coming up a script – which will give archive log count – hour-by-hour, daily – for a month: view on ONE Page.

This script runs on ORACLE Database Version 8i/9i/10g/11g.

This is a ‘SELECT only’ QUERY – to be run run as SYSTEM account.

This SQL QUERY finishes in ‘few’ seconds only (so, no adverse effect on database performance).

For your safety, advisable to run on your Development or Test instance (whichever is running in ARCHIVE MODE) first, before running on Production instance.

This script will generate output file named archive_log_count.html in the current directory (i.e. working directory).

If your Oracle database is running on non-Windows server, you need to transfer (ftp or WinSCP or similar) out-put file archive_log_count.html from non-Windows host to Windows PC and open the file in the web browser.

Best way to run this script is COPY & PASTE blue color text below at your SQL> prompt logged in as ‘SYSTEM’ account.

Here is the script (blue color) and sample output (inserted as image):

set echo off

set feedback off

set termout off

set pause off

set head on

set lines 100

set pages 500

clear columns

clear computes

set markup html on spool on preformat off entmap on –

head ‘ –

Redo Log Switch Report –

’ –

body   ‘BGCOLOR="#C0C0C0″‘ –

table  ‘BORDER="1″‘

set heading on

prompt Redo Log Switches for a month

CLEAR COLUMNS BREAKS COMPUTES

COLUMN DAY   FORMAT a75              HEADING ‘MM/dd; Time’

COLUMN H00   FORMAT 999,999B         HEADING ’00’

COLUMN H01   FORMAT 999,999B         HEADING ’01’

COLUMN H02   FORMAT 999,999B         HEADING ’02’

COLUMN H03   FORMAT 999,999B         HEADING ’03’

COLUMN H04   FORMAT 999,999B         HEADING ’04’

COLUMN H05   FORMAT 999,999B         HEADING ’05’

COLUMN H06   FORMAT 999,999B         HEADING ’06’

COLUMN H07   FORMAT 999,999B         HEADING ’07’

COLUMN H08   FORMAT 999,999B         HEADING ’08’

COLUMN H09   FORMAT 999,999B         HEADING ’09’

COLUMN H10   FORMAT 999,999B         HEADING ’10’

COLUMN H11   FORMAT 999,999B         HEADING ’11’

COLUMN H12   FORMAT 999,999B         HEADING ’12’

COLUMN H13   FORMAT 999,999B         HEADING ’13’

COLUMN H14   FORMAT 999,999B         HEADING ’14’

COLUMN H15   FORMAT 999,999B         HEADING ’15’

COLUMN H16   FORMAT 999,999B         HEADING ’16’

COLUMN H17   FORMAT 999,999B         HEADING ’17’

COLUMN H18   FORMAT 999,999B         HEADING ’18’

COLUMN H19   FORMAT 999,999B         HEADING ’19’

COLUMN H20   FORMAT 999,999B         HEADING ’20’

COLUMN H21   FORMAT 999,999B         HEADING ’21’

COLUMN H22   FORMAT 999,999B         HEADING ’22’

COLUMN H23   FORMAT 999,999B         HEADING ’23’

COLUMN TOTAL FORMAT 999,999,999      HEADING ‘Total’

break on report

compute  avg LABEL ‘Average:’ sum LABEL ‘Total:’ of total  ON report

SELECT

SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH:MI:SS’),1,5) || TO_CHAR(first_time, ‘ Dy’) DAY

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’00’,1,0)) H00

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’01’,1,0)) H01

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’02’,1,0)) H02

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’03’,1,0)) H03

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’04’,1,0)) H04

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’05’,1,0)) H05

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’06’,1,0)) H06

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’07’,1,0)) H07

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’08’,1,0)) H08

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’09’,1,0)) H09

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’10’,1,0)) H10

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’11’,1,0)) H11

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’12’,1,0)) H12

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’13’,1,0)) H13

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’14’,1,0)) H14

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’15’,1,0)) H15

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’16’,1,0)) H16

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’17’,1,0)) H17

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’18’,1,0)) H18

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’19’,1,0)) H19

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’20’,1,0)) H20

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’21’,1,0)) H21

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’22’,1,0)) H22

, SUM(DECODE(SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH24:MI:SS’),10,2),’23’,1,0)) H23

, COUNT(*)                                                                      TOTAL

FROM

v$log_history  a

where trunc(first_time) >= trunc(sysdate)-30

GROUP BY SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH:MI:SS’),1,5) || TO_CHAR(first_time, ‘ Dy’)

order BY SUBSTR(TO_CHAR(first_time, ‘MM/DD/RR HH:MI:SS’),1,5) || TO_CHAR(first_time, ‘ Dy’)

;

spool archive_log_count.html

/

spool off

exit

Sample Output:

Hope this helps!

Please feel free to revert back with your feedback of any type – corrections/concerns/clarifications/appreciation.

Best Regards,

Bhavesh Patel

TATA CONSULTANCT SERVICES,

,店铺淘客怎么做,物联网大赛,智能物联,云是什么,大数据分析方法
发表评论
验证码: 点击我更换图片

注:网友评论仅供其表达个人看法,并不代表本站立场。

热门文章

  • 域名备案_阿里云销售顾问_最新活动
    <strong>域名备案_阿里云销售顾问_最新活动</strong>

    域名备案_阿里云销售顾问_最新活动

    高速互联网和功能强大的应用程序使得几乎所有有办公桌工作的人都可以在家工作。然而今天,大多数公司仍然坚持要求员工忍受有时令人心碎的上下班路...

  • 数据库_分布式消息中间件实践pdf_免费领
    <strong>数据库_分布式消息中间件实践pdf_免费领</strong>

    数据库_分布式消息中间件实践pdf_免费领

    作者:马库斯·瓦纳关于2017年趋势的讨论正在迅速而激烈地展开,职场也不例外。随着新的一年即将到来,职场趋势专家们正在为2017年列出自己的预测清单...

  • 域名注册_自考数据库_免费6个月
    <strong>域名注册_自考数据库_免费6个月</strong>

    域名注册_自考数据库_免费6个月

    正如Facebook和Twitter首席运营官(COO)上周在美国国会作证时所说,出现的一个突出主题是,这些公司在保护其平台免受网络攻击方面所扮演的角色。这些公...

  • 域名解析_阿里云是什么意思_怎么买
    <strong>域名解析_阿里云是什么意思_怎么买</strong>

    域名解析_阿里云是什么意思_怎么买

    类别工作日新闻与文化财务人力资源规划技术创新分析与见解客户和社区行业金融服务政府保健高等教育款待媒体和娱乐专业和商业服务零售技术更多播客...

  • 网站服务器_王者荣耀服务器未响应_限时
    网站服务器_王者荣耀服务器未响应_限时

    网站服务器_王者荣耀服务器未响应_限时

    日本甲骨文公司今天宣布,ISOU项目采用甲骨文区块链平台管理一种本币的发行和消费。日本甲骨文公司是ISOU项目的支持公司,该项目旨在解决人口稀少地...

云储存

更多 >
云储存网站建设_企业邮箱foxmail_免费领
云储存网站建设_开源cdn源码_速度快
云储存游戏服务器_FTP服务器_是什么
云储存亚马逊云_仙剑奇侠传2百度云_是什么
云储存数据库服务器_分布式数据库的特性_怎么