Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • scripts to take listener.log backup Linux/Unix
  • Implementing Listener Security Oracle
  • This is im telling Kishore Oracle
  • Set Role explaination. Oracle
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • process id based files and processes Linux/Unix
  • oradebug ipcrm ipcs Oracle
  • Mutating Table Error while using database trigger Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Benefits and Usage of RMAN with Standby Databases Oracle
  • How to Modify the statistics collection by MMON for AWR repository Oracle
  • .profile Linux/Unix
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • 284785.1 How to check RAC Option is currently linked into the Oracle Binary Oracle

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 … 37 38 39 … 56 Next

Categories

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

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Remove duplicate rows from table Oracle
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • tblwopk.sql tablewopk.sql Oracle
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • First Entry in RAC Oracle
  • configUOCIOTTO.ora Oracle
  • SQLPLUS COPY command Precautions. Oracle
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme