Q

UTLBSTAT at startup, UTLESTAT at shutdown

How would I execute UTLBSTAT at instance startup? How would I execute UTLESTAT at instance shutdown? I am using the Oracle supplied dbstart and dbshut scripts provided on Compaq TRU64 Unix 4.0f with Oracle 8.1.7 to start/stop the instance.

Since you are using Oracle 8i, you can now use the AFTER STARTUP and BEFORE SHUTDOWN triggers. You can execute any code you wish in the PL/SQL blocks for those triggers.

Otherwise, you can just add a line in your dbstart or dbshut scripts which call a program to run UTLBSTAT or UTLESTAT. For instance, I have a script which can run UTLBSTAT as such:

#!/bin/csh
# stats_collect.sh
# by Brian Peasland
# 18 April 2002
# 
setenv PATH
/usr/openwin/bin:.:/usr/local:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/etc:/usr/etc:/usr/sbin:/usr/dt/bin
setenv ORAENV_ASK NO

setenv ORACLE_SID $SID
source /usr/local/bin/coraenv
sqlplus system/manager @$ORACLE_HOME/utlbstat.sql 
You can make modifications for running UTLESTAT. Then just put one line in dbshut or dbstart to run this script for you!

One final note...UTLBSTAT/ESTAT are not nearly as good as 8i's new STATSPACK. STATSPACK gives you so much more information! You might want to look into using STATSPACK instead.

For More Information


This was first published in August 2002

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close