Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • exp syntax in oracle 10g Oracle
  • sql_plan9i.sql Oracle
  • The most important Tuning Notes Oracle
  • UNderstand and eliminate Latch contention. Oracle
  • Implementing Listener Security Oracle
  • To find explain plan for a statement that occurred in past. Oracle
  • ORA-00064: object is too large to allocate on this O/S during startup Oracle
  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • USER_TABLES.Freelists Oracle
  • create database syntax Oracle
  • Jai Shree Ram Oracle
  • Monitor Long Running Job Oracle
  • Remove duplicate rows from table Oracle
  • Oracle 10g for solaris 10 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

  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • OPENING A STANDBY DATABASE IN READ-ONLY MODE Oracle
  • V$ROLLSTAT status is Full Oracle
  • Library cahe Latches and internal explaination Oracle
  • sess1.sql Oracle
  • run this before doing any dbchange pvm_pre_change.sql Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • How to change hostname in Linux Linux/Unix
  • Linux CPU info. Linux/Unix
  • To see mem usage and CPU usage system wide. Linux/Unix
  • temp_use.sql diplays usage of temp ts Oracle
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • Rollback force for distributed transactions Oracle
  • RAC 11g with vmware Oracle
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme