9206生成statspack步骤

生成statspack步骤

 

收集时间信息

TIMED_STATISTICS = true

Statspack的安装

set ORACLE_HOME=c:\oracle\ora92

@$ORACLE_HOME\rdbms\admin\spcreate.sql

输入perfstat用户的密码:根据password  profile,需要数字、字母和特殊字符

输入perfstat用户的默认表空间:USERS   至少需要140M空间

输入perfstat用户的临时表空间:TEMP

会在C:\Documents and Settings\Administrator下产生spcusr.lis记录创建用户的过程

产生spctab.lis记录创建对象的过程

 

生成快照,收集某个时间点的统计信息

conn perfstat/dating_123

execute STATSPACK.snap

隔一段时间,再次执行

execute STATSPACK.snap

会在C:\Documents and Settings\Administrator下产生spcpkg.lis记录以上脚本的执行过程

 

自动收集统计信息

@c:\oracle\ora92\rdbms\admin\spauto.sql

会在C:\Documents and Settings\Administrator下产生spauto.lis记录以上脚本的执行过程

 

产生报告

@c:\oracle\ora92\rdbms\admin\spreport.sql

 

enter value for begin_snap: 1   回车  根据实际情况指定开始和结束snap

 

enter value for end_snap:2  回车

 

enter value for report_name:sp_1_2  回车

查找sp_1_2.LST报告

 

STATSPACK

The STATSPACK package has been available with Oracle Database from Oracle8.1.6. When initially installed roughly 80 MBs of the users default tablespace is used. This may grow later with the tables storing snapshot information.

Installation of the STATSPACK Package

Installing the STATSPACK utility creates the Perfstat user, who owns all PL/SQL code and database objects created (including the STATSPACK tables, the constraints and the STATSPACK package). During the installation you will be prompted for the Perfstat user's default and temporary tablespaces.

Collecting Statistics

Take a snapshot of performance data log in to SQL*Plus as the Perfstat user, and execute the STATSPACK.snap procedure. This stores the current values for the performance statistics in the STATSPACK tables, which can be used as a baseline snapshot for comparison with another snapshot taken at a later time.

 

 

仅供自己使用,如有错误,请多指教!

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26432526/viewspace-735582/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26432526/viewspace-735582/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值