0% found this document useful (0 votes)
34 views2 pages

Gather Schema Stats

Uploaded by

kwakutse20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Gather Schema Stats

Uploaded by

kwakutse20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

#!

/bin/sh

export ORACLE_HOME=/u01/oracle/11.2.0/db_home
export ORACLE_BASE=/home/oracle
export ORACLE_SID=bionhdb1
export ORACLE_UNQNAME=bionhdb
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export LOG=/home/oracle/Gather_Schema_Stats.log

echo
"=====================================================================
================" >> $LOG
echo "Starting Execution of Gather Schema Statistics on `date`" >>
$LOG
echo
"=====================================================================
================" >> $LOG
echo
"=====================================================================
================" >> $LOG
sqlplus '/ as sysdba' << EOF >> $LOG

set echo on
set timing on
prompt gather_schema_stats on ABIS_INTERNAL
exec dbms_stats.gather_schema_stats(ownname =>
'ABIS_INTERNAL',options => 'GATHER',estimate_percent =>
50,method_opt=> 'for all INDEXED columns size
SKEWONLY',cascade=>TRUE,degree=>24);
prompt gather_schema_stats on ABIS_CONTROLLER
exec dbms_stats.gather_schema_stats(ownname =>
'ABIS_CONTROLLER',options => 'GATHER',estimate_percent =>
dbms_stats.auto_sample_size,method_opt=> 'for all INDEXED columns size
SKEWONLY',cascade=>TRUE,degree=>20);
prompt gather_schema_stats on XXCLAIM
exec dbms_stats.gather_schema_stats(ownname =>
'XXCLAIM',options => 'GATHER',estimate_percent =>
dbms_stats.auto_sample_size,method_opt=> 'for all INDEXED columns size
SKEWONLY',cascade=>TRUE,degree=>20);
prompt gather_schema_stats on EDI_GATEWAY
exec dbms_stats.gather_schema_stats(ownname =>
'EDI_GATEWAY',options => 'GATHER',estimate_percent =>
dbms_stats.auto_sample_size,method_opt=> 'for all INDEXED columns size
SKEWONLY',cascade=>TRUE,degree=>20);
prompt gather_schema_stats on XXBIO
exec dbms_stats.gather_schema_stats(ownname => 'XXBIO',options
=> 'GATHER',estimate_percent =>
dbms_stats.auto_sample_size,method_opt=> 'for all INDEXED columns size
SKEWONLY',cascade=>TRUE,degree=>20);
prompt gather_schema_stats on SYS
exec dbms_stats.gather_schema_stats ('SYS');
EOF

echo
"=====================================================================
================" >> $LOG
echo "Finished Executing Gather Schema Statistics on `date`" >> $LOG
echo
"=====================================================================
================" >> $LOG
echo
"=====================================================================
================" >> $LOG

You might also like