Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • Jai Shree Ram Oracle
  • dbinv.sql Oracle
  • Explain Plan Output 2 Oracle
  • Some OS level threshold for performance. Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • oracle 11g RAC on vmware Oracle
  • USER_TABLES.Freelists Oracle
  • pvm_pre_change.sql Oracle
  • tar and untar a dolder with all its subfolder. Linux/Unix
  • create database link syntax Oracle
  • CPU speed on solaris Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • crontab syntax Linux/Unix
  • How to Modify the statistics collection by MMON for AWR repository Oracle

Year: 2006

find_open_cur.sql Find open cursorts per session

Posted on 10-Mar-2006 By Admin No Comments on find_open_cur.sql Find open cursorts per session

set lines 132 set pages 300 column numopencursors format d8 column machine format a30 column osuser format a20 column username format a20 SELECT s.sid, v.value as numopencursors ,s.machine ,s.osuser,s.username FROM V$SESSTAT v, V$SESSION s WHERE v.statistic# = 3 and v.sid = s.sid ;

Oracle, SQL scripts

TRUNCATE Privs

Posted on 10-Mar-2006 By Admin No Comments on TRUNCATE Privs

To truncate a table or cluster, the table or cluster must be in your schema or you must have DROP ANY TABLE system privilege.

Oracle, SQL scripts

Single character replacement in Unix

Posted on 08-Mar-2006 By Admin No Comments on Single character replacement in Unix

uocdbprod21->WEBARCH@(/db2/oradata)ls -rlt /db?/oradata/WEBP18F /db6/oradata/WEBP18F: total 0 /db5/oradata/WEBP18F: total 0 /db3/oradata/WEBP18F: total 0 /db4/oradata/WEBP18F: total 0 /db2/oradata/WEBP18F: total 0 uocdbprod21->WEBARCH@(/db2/oradata)

Linux/Unix, shell

Create type and Grant on it.

Posted on 06-Mar-2006 By Admin No Comments on Create type and Grant on it.

conn cs/XXX Create TYPE VARCHAR2_ARRAY AS VARRAY(5000) OF VARCHAR2(50); Grant execute on VARCHAR2_ARRAY to r_exec_cs;

Oracle, SQL scripts

Flowers Resize datafiles

Posted on 02-Mar-2006 By Admin No Comments on Flowers Resize datafiles

In flowers we resize datafile using following command: alter database resize datafile ‘/path1/filename.dbf’ resize 500M; this will change that datafles ‘SIZE’ column and allocate that much space for that datafile. If you are having standby database pls make sure that enough space is available for that file expansion.

Oracle, rman-dataguard

age_alert.ksh aging out alert.log

Posted on 28-Feb-2006 By Admin No Comments on age_alert.ksh aging out alert.log

!/bin/ksh . /export/home/oracle/envs/oracle_env_PNETP save_date=`date +%Y%m%d%H%M` # Set ORATAB variable if [ -f /etc/oratab ] ; then ORATAB=/etc/oratab else if [ -f /var/opt/oracle/oratab ] ; then ORATAB=/var/opt/oracle/oratab else echo “” echo “`date` Cannot find oratab!” echo “” exit 2 fi fi export ORATAB # search the alert log for errors for all databases # for ORACLE_SID…

Read More “age_alert.ksh aging out alert.log” »

Linux/Unix, shell

cur_sql.sql

Posted on 27-Feb-2006 By Admin No Comments on cur_sql.sql

spool cur_sql set lines 132 set pages 300 col USR format a14 col PAR heading “Parsing ID” format 9999999 col ELA heading “ELP time(Sec)” format 9999999.0 col HASH heading “Hash Value” col USR heading “Parsing User” col T heading “SQL Text having Elapsed time > 1 sec” break on HASH on USR on ELA skip…

Read More “cur_sql.sql” »

Oracle, SQL scripts

avail.sh ( find filesystem spae usage)

Posted on 23-Feb-2006 By Admin No Comments on avail.sh ( find filesystem spae usage)

df -k | grep -i “/EMCdb”|awk ‘{tot += $2; used += $3; avail += $4;} END {print “Total”,tot/1024/1024,”Used “,used/1024/1024,”Avail “avail/102 4/1024, “Avail % ” avail*100/tot, “Used % ” used*100/tot}’ df -k | grep -i “/testdb”|awk ‘{tot += $2; used += $3; avail += $4;} END {print “Total”,tot/1024/1024,”Used “,used/1024/1024,”Avail “avail/10 24/1024, “Avail % ” avail*100/tot, “Used…

Read More “avail.sh ( find filesystem spae usage)” »

Linux/Unix, shell

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 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

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

Follwing is the script for manually gathering Stats using DBMS_STATS. Execution will be like ./analyze_schema.ksh /oracle/app/oracle/oraprocs/ora_SID.env CIF – Script Start #!/usr/bin/ksh ########## Configuration ############# ENV_FILE=$1 SCHEMA_NAME=$2

Oracle, SQL scripts

Posts pagination

Previous 1 … 7 8 9 … 11 Next

Categories

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

Recent Posts

  • 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
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Find_stale_dr.sql finding stale physical DR.. Oracle
  • before_trunc.sql Before Truncate table needs to execute following: Oracle
  • How to check current redo log progress redo_progress.sql Oracle
  • Histogram Overview Oracle
  • Rownum with Order by Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • setting prompt display with .profile Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme