Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Oracle vs MYSQL Architecture differences (For DBAs) MYSQL
  • sqlnet.ora paramters Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • oracle Dba site Oracle
  • Export With Query Another Example. Oracle
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • Debugging Shell FIles Linux/Unix
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • CPU Core related projections AWS
  • Important Solaris Commands Linux/Unix
  • Good links for x$ tables in oracle. Oracle
  • CTAS with LONG Column for 7.x and 8 and 8i Oracle
  • Removing Ctrl-M from end of line using vi Linux/Unix
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • Sending email with file attachment. 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

  • This is from Temi Oracle
  • db_status.sql Oracle
  • CTAS with LONG Column for 9i and higher Oracle
  • AWR settings- MMON is not taking snapshot. Oracle
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • Oracle Statspack survival Guide 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
  • OEM-troubleshooting on 20-MAY-08 Oracle
  • Find Plan Hash value fphv.sql Oracle
  • How To Limit The Access To The Database So That Only One User Per Schema Are Connected (One Concurrent User Per Schema) Oracle
  • useful dg links Oracle
  • GSQ.sql Oracle
  • UTL_FILE test program Oracle
  • V$ROLLSTAT status is Full Oracle
  • checking redhat linux version Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme