SQL> select max(snap_id) from stats$snapshot; MAX(SNAP_ID) ------------ 166 SQL> delete from stats$snapshot where snap_id < = 166; 143 rows deleted |
SQL> select a.object_id,a.oracle_username ,b.object_name from v$locked_object a,dba_objects b where a.object_id = b.object_id / OBJECT_ID ORACLE_USERNAMEOBJECT_NAME ------------------------------------- --------------------------------------------------------- 156 PERFSTATSNAP$ 39700 PERFSTATSTATS$LIBRARYCACHE 39706 PERFSTATSTATS$ROLLSTAT 39712 PERFSTATSTATS$SGA 39754 PERFSTATSTATS$PARAMETER 39745 PERFSTATSTATS$SQL_STATISTICS 39739 PERFSTATSTATS$SQL_SUMMARY 39736 PERFSTATSTATS$ENQUEUESTAT 39733 PERFSTATSTATS$WAITSTAT 39730 PERFSTATSTATS$BG_EVENT_SUMMARY 39724 PERFSTATSTATS$SYSTEM_EVENT 39718 PERFSTATSTATS$SYSSTAT 39715 PERFSTATSTATS$SGASTAT 39709 PERFSTATSTATS$ROWCACHE_SUMMARY 39703 PERFSTATSTATS$BUFFER_POOL_STATISTICS 39697 PERFSTATSTATS$LATCH_MISSES_SUMMARY 39679 PERFSTATSTATS$SNAPSHOT 39682 PERFSTATSTATS$FILESTATXS 39688 PERFSTATSTATS$LATCH 174 PERFSTATJOB$ 20 rows selected |
truncate table STATS$FILESTATXS; truncate table STATS$LATCH; truncate table STATS$LATCH_CHILDREN; truncate table STATS$LATCH_MISSES_SUMMARY; truncate table STATS$LATCH_PARENT; truncate table STATS$LIBRARYCACHE; truncate table STATS$BUFFER_POOL_STATISTICS; truncate table STATS$ROLLSTAT; truncate table STATS$ROWCACHE_SUMMARY; truncate table STATS$SGA; truncate table STATS$SGASTAT; truncate table STATS$SYSSTAT; truncate table STATS$SESSTAT; truncate table STATS$SYSTEM_EVENT; truncate table STATS$SESSION_EVENT; truncate table STATS$BG_EVENT_SUMMARY; truncate table STATS$WAITSTAT; truncate table STATS$ENQUEUESTAT; truncate table STATS$SQL_SUMMARY; truncate table STATS$SQL_STATISTICS; truncate table STATS$SQLTEXT; truncate table STATS$PARAMETER; delete from STATS$SNAPSHOT; delete from STATS$DATABASE_INSTANCE; commit; |
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |