Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Oracle Support Metalink ID 161818.1 Oracle
  • How to see which patches are applied. Oracle
  • Very Good Oralce Internal Tuning Book Oracle
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • chk_space_SID.ksh Linux/Unix
  • How to start CRS manually Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle
  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix
  • sql_doing_fts.sql Oracle
  • Insert cause enqueue locks Oracle
  • Restoring a user’s original password 1051962.101 Oracle
  • Check Oracle installed products using one command Oracle
  • tblwopk.sql tablewopk.sql Oracle

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

  • Optimizer SORT Operations Oracle
  • Benefits and Usage of RMAN with Standby Databases Oracle
  • Pending Transaction Neighbors Script Oracle
  • Good notes for shared pool Oracle
  • Free conference number from http://www.freeconference.com Oracle
  • Error Handling in Proc 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 (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Rman Notes -1 Oracle
  • find_log_switch.sql Find log switches in graphical manner Oracle
  • Finding locked objects Oracle
  • Drop tempfiles from database Oracle
  • sql_plan9i.sql Oracle
  • Running select from V$ views from remote server Linux/Unix
  • refre.sql Oracle
  • Explain Plan Output 2 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme