Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • create a folder in multiple places Linux/Unix
  • crontab syntax Linux/Unix
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle
  • purge_trc.sh Linux/Unix
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • scp with ssh2 Linux/Unix
  • Getting started with notebook Python/PySpark
  • S3 Basic info AWS
  • Sending email with file attachment. Linux/Unix
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • dbms_job.submit example Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • 751131.1 New Article Error 2819 While Requesting a Systemstate Dump Oracle
  • tuning commmand for cpu, ip and memory stats Linux/Unix

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

  • 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 nth max and min. Oracle
  • Caching sequence in Memory Oracle
  • block_ident.sql Oracle
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • Multiple listeners Oracle
  • CTAS with LONG Column for 9i and higher Oracle
  • SQL Server Vs Oracle Architecture difference SQL Server
  • How to remove blank lines using vi editor command Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme