Truncate Stats pack data

DBA Notes: 2011/10/20

Cheng Li

 

Truncate Stats pack data

 

For DBA routine operation, we meet a warning as following:

 

Issue:

Subject: EVENT Oracle DB Kenan Prod storage events WARNING

Name : Oracle DB Kenan Prod storage events Target Name : CTMCAT Target Type : Database Node Name : kenandb.ctm.plc.cwintra.com Status : WARNING

Tablespace Full

Tablespace TOOLS is 95.66% full.  22720.0 KBytes of free space remain.

WARNING

Oct 19 2011 06:31:06 AM

 

This tablespace is allocated for stats pack usage.

 

Solution:

 

SQL> conn perfstat/perfstat@ctmcat

Connected.

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

CTMCAT

 

SQL> @$ORACLE_HOME/rdbms/admin/sptrunc.sql

 

Warning

~~~~~~~

Running sptrunc.sql removes ALL data from Statspack tables.  You may wish to export the data before continuing.

 

About to Truncate Statspack Tables

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If would like to exit WITHOUT truncating the tables, enter any text at the begin_or_exit prompt (e.g. 'exit'), otherwise if you would like to begin the truncate operation, press

 

Enter value for begin_or_exit:

Entered  at the 'begin_or_exit' prompt

 

Beginning truncate operation

Table truncated.

1159 rows deleted.

1 row deleted.

Commit complete.

Package altered.

Truncate operation complete

 

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production With the Partitioning option JServer Release 9.2.0.7.0 - Production $

 

 

Reference:

fj.png野兽拖鞋.jpg

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

转载于:http://blog.itpub.net/26136400/viewspace-709600/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值