Statspack 安装和使用
使用Statspack的性能采集是通过快照的方式实现的,即Statspack在某一个时间点对系统的性能数据做一个快照,并将快照保存在perfst
perfcreate
使用sys用户连接数据库,并运行spcreate.sql脚本,,首先要先输入新建用户perfstat的密码,我们输入的密码是perfcreate。
Choose the Default tablespace for the PERFSTAT user
---------------------------------------------------
Below is the list of online tablespaces in this database which can
store user data. Specifying the SYSTEM tablespace for the user's
default tablespace will result in the installation FAILING, as
using SYSTEM for performance data is not supported.
Choose the PERFSTAT users's default tablespace. This is the tablespace
in which the STATSPACK tables and indexes will be created.
TABLESPACE_NAME CONTENTS STATSPACK DEFAULT TABLESPACE
------------------------------ --------- ----------------------------
CW PERMANENT
CW_MD PERMANENT
CW_PART PERMANENT
DBAPI PERMANENT
PETDOG PERMANENT
SEVEN PERMANENT
STRMADMIN PERMANENT
SYSAUX PERMANENT *
USERS PERMANENT
Pressing
tablespace (identified by *) being used.
输入 default_tablespace 的值: users
接下来Oracle列出了数据库中可以使用的表空间,要求我们为用户perfstat指定默认表空间,也就是之后储存Statspack信息的表空间,这里我们选择users表空间。
Using tablespace USERS as PERFSTAT default tablespace.
Choose the Temporary tablespace for the PERFSTAT user
-----------------------------------------------------
Below is the list of online tablespaces in this database which can
store temporary data (e.g. for sort workareas). Specifying the SYSTEM
tablespace for the user's temporary tablespace will result in the
installation FAILING, as using SYSTEM for workareas is not supported.
Choose the PERFSTAT user's Temporary tablespace.
TABLESPACE_NAME CONTENTS DB DEFAULT TEMP TABLESPACE
------------------------------ --------- --------------------------
TEMP TEMPORARY *
Pressing
tablespace (identified by *) being used.
输入 temporary_tablespace 的值: temp
接着,输入默认临时表空间,毫无疑问,我们选择temp表空间。
下面就是创建perfstat用户对象的操作:
If this script is automatically called from spcreate (which is
the supported method), all STATSPACK segments will be created in
the PERFSTAT user's default tablespace.
Using users tablespace to store Statspack objects
... Creating STATS$SNAPSHOT_ID Sequence
序列已创建。
同义词已创建。
... Creating STATS$... tables
表已创建。
同义词已创建。
表已创建。
已创建 1 行。
已创建 1 行。
......
同义词已创建。
同义词已创建。
NOTE:
SPCTAB complete. Please check spctab.lis for any errors.
......
Creating Package STATSPACK...
程序包已创建。
没有错误。
Creating Package Body STATSPACK...
程序包体已创建。
没有错误。
NOTE:
SPCPKG complete. Please check spcpkg.lis for any errors.
至此,Statspack安装完成,下面接着使用Statspack做性能采集和性能分析。

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

本文讨论了使用MySQL的Alter Table语句修改表,包括添加/删除列,重命名表/列以及更改列数据类型。

文章讨论了为MySQL配置SSL/TLS加密,包括证书生成和验证。主要问题是使用自签名证书的安全含义。[角色计数:159]

文章讨论了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比较了它们对初学者和高级用户的功能和适合性。[159个字符]

本文讨论了使用Drop Table语句在MySQL中放下表,并强调了预防措施和风险。它强调,没有备份,该动作是不可逆转的,详细介绍了恢复方法和潜在的生产环境危害。

InnoDB的全文搜索功能非常强大,能够显着提高数据库查询效率和处理大量文本数据的能力。 1)InnoDB通过倒排索引实现全文搜索,支持基本和高级搜索查询。 2)使用MATCH和AGAINST关键字进行搜索,支持布尔模式和短语搜索。 3)优化方法包括使用分词技术、定期重建索引和调整缓存大小,以提升性能和准确性。

本文讨论了在PostgreSQL,MySQL和MongoDB等各个数据库中的JSON列上创建索引,以增强查询性能。它解释了索引特定的JSON路径的语法和好处,并列出了支持的数据库系统。
