Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Good notes on Oracle Events Oracle
  • xargs use Linux/Unix
  • Monitor and Trace Unix processes using truss Linux/Unix
  • Explain Plan Output 2 Oracle
  • Very Good Oralce Internal Tuning Book Oracle
  • More info about /proc folder and its relation with processes. Linux/Unix
  • Backup and Recovery Scenarios Oracle
  • Good Oracle Architecture In Short and point to point Oracle
  • Facts about SCN and Rollback Segment Oracle
  • cache buffer chain latch Oracle
  • setting prompt display with .profile Linux/Unix
  • Implementing Listener Security Oracle
  • kill all processes from specific user in solaris. Linux/Unix
  • get_vmstat.ksh for Solaris Oracle
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix

Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry

Posted on 22-Feb-2006 By Admin No Comments on Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry

. $ENV_FILE

echo “Started Analyze Schema of $SCHEMA_NAME at `date +%D-%T`”

$ORACLE_HOME/bin/sqlplus -s <connect / as sysdba

execute dbms_stats.gather_schema_stats( ownname => ‘$SCHEMA_NAME’,

degree => DBMS_STATS.DEFAULT_DEGREE,

cascade => TRUE,

granularity=> ‘ALL’ );

EOF

echo “Ended at `date +%D-%T`”

– Script End

Also, configure cron for execution on every sunday 11.00 PM as following.

00 11 * * 0 /export/home/oracle/oraprocs/analyze_schema.ksh /oracle/app/oracle/oraprocs/ora_SID.env CIF > /export/home/oracle/oraprocs/logs/analyze_schema_CIF.log 2> /export/home/oracle/oraprocs/logs/analyze_schema_CIF.err

Oracle, SQL scripts

Post navigation

Previous Post: Disbaling DBA_SCHEDULER_JOBS
Next Post: avail.sh ( find filesystem spae usage)

Related Posts

  • find_longsql.sql Oracle
  • Sample WW22 listener.ora Oracle
  • Goldengate document from Porus Oracle
  • Oracle Material from OTN Oracle
  • CPU Core related projections AWS
  • Histogram Overview Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Wait Based Tuning Step by step with SQL statement Oracle
  • before_trunc.sql Before Truncate table needs to execute following: Oracle
  • Renaming the column name Oracle
  • How to start CRS manually Oracle
  • My Minimum Tuning Programs Oracle
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • Find_table_size.sql Oracle
  • backspace in SQL Plus not working then..? Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme