Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Drop all SPM baselines for SQL handle Oracle
  • plan10g.sql Oracle
  • Goldengate document from Porus Oracle
  • fkwoind.sql fkwoindex.sql Oracle
  • Important Solaris Commands Linux/Unix
  • Multiple listeners Oracle
  • Directory wise folder wise space usage Linux/Unix
  • Running select from V$ views from remote server Linux/Unix
  • proc.sql Oracle
  • find_idle_cpu.sql Oracle
  • moving lob object to other tablespace lob_mvmt.sql Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • longtx.sql Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • Oracle 10g Wait Model Oracle

Year: 2006

Logic to chech # of parameters command line parameters

Posted on 05-Oct-2006 By Admin No Comments on Logic to chech # of parameters command line parameters

# Exit if no first parameter $1. if [ -z “$1” ] then echo “Usage: check_parms.ksh (where value is > 100)” exit 99 fi # Exit if no second parameter $2. if [ -z “$2” ] then echo “Usage: check_parms.ksh (where value is > 100)” exit 99 fi # Exit if parm is not greater…

Read More “Logic to chech # of parameters command line parameters” »

Linux/Unix, shell

oracle tips… from http://www.bijoos.com/oracle/douknow.htm

Posted on 03-Oct-2006 By Admin No Comments on oracle tips… from http://www.bijoos.com/oracle/douknow.htm

1998/10 In PL/SQL you can suspend a session using dbms_lock.sleep (seconds) which is equivalent to the ‘sleep’ command in UNIX. The parameter (number data type) can even be specified in hundredth of a second (10, 10.01, 10.5, 0.99 are all legal values). 1998/11 When you TRUNCATE a table, the storage parameter NEXT is automatically reset…

Read More “oracle tips… from http://www.bijoos.com/oracle/douknow.htm” »

Oracle, SQL scripts

How to find where datafile is created dbf_info.sql

Posted on 28-Sep-2006 By Admin No Comments on How to find where datafile is created dbf_info.sql

column name format a60 column created format a25 select name, to_char(creation_time, ‘DD-MON-RRRR:HH24:MI’) created from v$datafile_header order by creation_time /

Oracle, SQL scripts

To find explain plan for a statement that occurred in past.

Posted on 27-Sep-2006 By Admin No Comments on To find explain plan for a statement that occurred in past.

Find hash value & time when this plan was taken for particular sql id. Filename : fphv.sql REM *** Find Plan Hash value column plan_hash_value format 999999999999 accept v_sqlid prompt ‘Enter SQL_ID : ‘ select distinct sql_id, plan_hash_value, to_char(timestamp, ‘DD-MON-RRRR:HH24:MI:SS’) from dba_hist_sql_plan where sql_id=’&v_sqlid’; Then, Apply sql id and plan_hash_value for a unique plan. REM…

Read More “To find explain plan for a statement that occurred in past.” »

Oracle, SQL scripts

currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql

Posted on 27-Sep-2006 By Admin No Comments on currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql

set lines 120 pages 200 column event format a30 column object_type format a14 column object_name format a30 column owner format a10 column sql_text format a120 spool currwaitobj accept event_name prompt ‘Enter fraction of event to trace : ‘ accept start_time1 prompt ‘Start Time in (DD-MON-RRRR:HH24:MI format) : ‘ accept stop_time1 prompt ‘Stop Time in (DD-MON-RRRR:HH24:MI…

Read More “currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql” »

Oracle, SQL scripts

Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql

Posted on 27-Sep-2006 By Admin No Comments on Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql

REM fplan.sql REM Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE. column plan_hash_value format 999999999999 accept v_sqlid prompt ‘Enter SQL_ID : ‘ accept v_plan_hash_value prompt ‘Enter PLAN Hash Value : ‘ SELECT LPAD(‘ ‘,2*(LEVEL-1))||operation||’ ‘||options ||’ ‘||object_name ||’ ‘|| DECODE(id, 0, ‘Cost = ‘||position) “Query Plan” FROM dba_hist_sql_plan START WITH id =…

Read More “Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql” »

Oracle, SQL scripts

Find Plan Hash value fphv.sql

Posted on 27-Sep-2006 By Admin No Comments on Find Plan Hash value fphv.sql

Filename : fphv.sql REM *** Find Plan Hash value column plan_hash_value format 999999999999 accept v_sqlid prompt ‘Enter SQL_ID : ‘ select distinct sql_id, plan_hash_value, to_char(timestamp, ‘DD-MON-RRRR:HH24:MI:SS’) from dba_hist_sql_plan where sql_id=’&v_sqlid’;

Oracle, SQL scripts

shr1.sql for MTS or Shared server configuration

Posted on 27-Sep-2006 By Admin No Comments on shr1.sql for MTS or Shared server configuration

set lines 120 pages 200 select status, count(1) from v$shared_server group by status; select * from v$shared_server_monitor; select dispatcher, count(1) from v$circuit group by dispatcher; select * from v$sgastat where name like ‘%free memory%’;

Oracle, SQL scripts

sess1.sql

Posted on 27-Sep-2006 By Admin No Comments on sess1.sql

column osuser format a10 column username format a30 column machine format a30 column program format a40 column sid format 99999999 column serial# format 99999999 column TOT format 999999 heading “Total Sessions” break on report compute sum of TOT on report set lines 141 set pages 500 select machine, osuser, username, count(1) “TOT” from v$session group…

Read More “sess1.sql” »

Oracle, SQL scripts

currwait.sql

Posted on 27-Sep-2006 By Admin No Comments on currwait.sql

set lines 120 pages 200 column event format a30 column object_type format a14 column object_name format a30 column owner format a10 column sql_text format a120 accept event_name prompt ‘Enter fraction of event to trace : ‘ select distinct a.event, s.sql_id, s.sql_text, s.executions from v$session a, v$sqlarea s where s.sql_id = a.sql_id and lower(a.event) like lower(‘%&event_name%’)…

Read More “currwait.sql” »

Oracle, SQL scripts

Posts pagination

Previous 1 2 3 … 11 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
  • pvm_pre_change.sql Oracle
  • Kernel Parameters for Solaris Linux/Unix
  • shr1.sql for MTS or Shared server configuration Oracle
  • eplan.sql Oracle
  • pvm_metric.sql for gathering report from vmstat tables Oracle
  • Goog notes on X$ tables Oracle
  • Getting started with notebook Python/PySpark

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme