惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
T
Threatpost
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
V2EX - 技术
V2EX - 技术
D
Docker
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
T
Troy Hunt's Blog
Webroot Blog
Webroot Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
量子位
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
F
Full Disclosure
B
Blog
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
Forbes - Security
Forbes - Security
Know Your Adversary
Know Your Adversary
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
Scott Helme
Scott Helme
T
The Exploit Database - CXSecurity.com
博客园 - 聂微东
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
Recorded Future
Recorded Future
IT之家
IT之家
Project Zero
Project Zero
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
SecWiki News
SecWiki News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

博客园 - 小光_520

这个博客18年了.. C#基础概念之延迟加载(转) 把EXCEL文件导入到GridView,GridView根据要求动态的增加列(转) C# ASP.NET CSV文件导入数据库(转) GridView 使用方法总结二(转) GridView 使用方法总结一(转) 单条SQL语句实现复杂逻辑几例(转) Statspack之十四-"log file sync" 等待事件(转贴) Statspack之十三-Enqueue(转贴) Statspack之十二-db file scattered read-DB文件分散读取(转帖) Statspack之十一-Statspack报告各部分简要说明(转帖) Statspack之十-调整STATSPACK的收集门限(转帖) Statspack之九-其它重要脚本(转帖) Statspack之八-删除历史数据(转帖) Statspack之七-移除定时任务(转贴) Statspack之六-生成分析报告(转贴) Statspack之五-规划自动任务(转贴) Statspack之三-安装statspack(转贴) Statspack之二-需要更改的系统参数(转贴)
Statspack之四-测试安装好的Statspack(转贴)
小光_520 · 2011-09-06 · via 博客园 - 小光_520

运行statspack.snap可以产生系统快照,运行两次,然后执行spreport.sql就可以生成一个基于两个时间点的报告。

如果一切正常,说明安装成功。

SQL>execute statspack.snap

PL/SQL procedure successfully completed.

SQL>execute statspack.snap

PL/SQL procedure successfully completed.

SQL>@spreport.sql

可是有可能你会得到以下错误:

SQL> exec statspack.snap;

BEGIN statspack.snap; END;

*

ERROR at line 1:

ORA-01401: inserted value too large for column

ORA-06512: at "PERFSTAT.STATSPACK", line 978

ORA-06512: at "PERFSTAT.STATSPACK", line 1612

ORA-06512: at "PERFSTAT.STATSPACK", line 71

ORA-06512: at line 1

这是Oracle的一个Bug,Bug号1940915

该Bug自8.1.7.3后修正。

这个问题只会出现在多位的字符集,需要修改spcpkg.sql脚本,$ORACLE_HOME/rdbms/admin/spcpkg.sql,
将"substr" 修改为 "substrb",然后重新运行该脚本。

该脚本错误部分:

select l_snap_id

, p_dbid

, p_instance_number

, substr(sql_text,1,31)

...........

substr 会将多位的字符, 当作一个byte.substrb 则会当作多个byte。在收集数据时, statpack 会将 top 10
的 sql 前 31 个字节存入数据表中,若在SQL的前31 个字有中文,就会出现此错误。

转自:http://www.eygle.com/statspack/statspack04.htm

:报告一般生成在当前文件夹内。