Running the utlbstat and utlestat scripts
Before running either script, you need to start Server Manager and connect as INTERNAL
. The boldface type in the following example shows what you would type.
$svrmgrl
Oracle Server Manager Release 3.1.5.0.0 - Production
(c) Copyright 1997, Oracle Corporation. All Rights Reserved.
Oracle8i Release 8.1.5.0.0 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production
SVRMGR> connect internal
Connected.
Once connected as INTERNAL
, you begin the statistics collection process by running utlbstat
.
you will see quite a bit of output scroll by on the screen as the work tables are dropped, re-created, and then populated with a snapshot of current statistic values.
SVRMGR>@utlbstat
SVRMGR> Rem ******************************************************************
SVRMGR> Rem First create all the tables
SVRMGR> Rem ******************************************************************
SVRMGR>
SVRMGR> drop table stats$begin_stats;
drop table stats$begin_stats
*
ORA-00942: table or view does not exist
SVRMGR> create table stats$begin_stats as select * from v$sysstat where 0 = 1;
Statement processed.
SVRMGR> drop table stats$end_stats;
drop table stats$end_stats
*
ORA-00942: table or view does not exist
SVRMGR> create table stats$end_stats as select * from stats$begin_stats;
Statement processed.
...
To end the statistics process, run utlestat
. The output from this script will be even longer, and you will see the entire statistics
report scroll by on the screen as it is written out to the report.txt file.
SVRMGR> @utlestat
SVRMGR> rem
SVRMGR> rem $Header: utlestat.sql 17-apr-98.15:26:01 kquinn Exp $ estat.sql
SVRMGR> rem
SVRMGR> Rem Copyright (c) 1988, 1996, 1998 by Oracle Corporation
SVRMGR> Rem NAME
SVRMGR> REM UTLESTAT.SQL
SVRMGR> Rem FUNCTION
SVRMGR> Rem This script will generate a report (in "report.txt") which will contain
SVRMGR> Rem useful information for performance monitoring. In particular
SVRMGR> Rem information from v$sysstat, v$latch, and v$rollstat.
SVRMGR> Rem NOTES
SVRMGR> Rem Don't worry about errors during "drop table"s, they are normal.
This should give you a good idea of the mechanics involved in generating statistics. The Server Manager output scrolling by on the screen is not
important. It's the final results in the report.txt file that you want to look at.