Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Jai Shree Ram Oracle
  • find checksum of a file. Linux/Unix
  • Oracle 11g RAC on OEL 5 and Vmware 2 Oracle
  • compile_inv.sql Oracle
  • USE_NL and INDEX hints example Oracle
  • on IBM-AIX for display Linux/Unix
  • Rename Tablespace Oracle
  • Jai Shree Ram Linux/Unix
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • get_vmstat_linux Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • ORA-00064: object is too large to allocate on this O/S during startup Oracle
  • Good links for x$ tables in oracle. Oracle
  • purge_trc.sh Linux/Unix
  • Oracle 11g Environment Setup 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

  • create user with unlimited quota Oracle
  • logminer and my_lbu Oracle
  • switchover for primary database Oracle
  • Display the top 5 salaries for each department using single SQL Oracle
  • FRA Information. Oracle
  • AWR license 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
  • Processes Parameter decision Oracle
  • Add new columns in dataframe Python/PySpark
  • find_cons.sql Oracle
  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix
  • find the files that are 1 day old. Linux/Unix
  • Resolving RMAN Hung Jobs Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • Oracle 11g Environment Setup Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme