Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • RMAN : Consistent Backup, Restore and Recovery using RMAN Oracle
  • create user with unlimited quota Oracle
  • pvm_metric.sql for gathering report from vmstat tables Oracle
  • newupload.html PHP/MYSQL/Wordpress
  • Alter procedure auditing Oracle
  • CPU speed on solaris Linux/Unix
  • cur_sql.sql Oracle
  • dbms_job.submit example Oracle
  • Changing the Global Database Name Oracle
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle
  • initUOCIOTTO.ora Oracle
  • Distributed Transaction Troubleshooting. Oracle
  • Histogram Overview Oracle
  • Find sort details from Db find_sort.sql Oracle
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress

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

mutex in Oracle 10.2.0.2 or Oracle 10g

Posted on 13-Sep-2006 By Admin No Comments on mutex in Oracle 10.2.0.2 or Oracle 10g

######### # _kks_use_mutex_pin # # Enables use of more efficient mutex mechanism for # implementing library cache pins. # ######### _kks_use_mutex_pin=TRUE Apparently, Oracle is migrating some of its serialization protection from latches to mutexes. For example, the structures previously protected by the Library Cache Pin latch are now protected by a mutex and evidenced by…

Read More “mutex in Oracle 10.2.0.2 or Oracle 10g” »

Oracle, SQL scripts

Renaming Global Name GLOBAL_NAME

Posted on 06-Sep-2006 By Admin No Comments on Renaming Global Name GLOBAL_NAME

Problem: ——– I cannot create a db_link on my database that does not have the fuly qualified domain.name. eg. if I create a db_link called fred as follows: create database link fred connect to ITU604SP4B identified by using ‘sup9206_hippo’ a link called fred.intec.co.za is created, I just want fred. I have set global_names= FALSE db_domain=””…

Read More “Renaming Global Name GLOBAL_NAME” »

Oracle, SQL scripts

sbind.sql Find Bind variable from sql_id sqlid

Posted on 30-Aug-2006 By Admin No Comments on sbind.sql Find Bind variable from sql_id sqlid

column name format a10 column position format 99 column datatype_string format a20 column value_string format a50 set lines 120 pages 200 select sql_id, name, position, datatype_string, value_string from v$sql_bind_capture where sql_id = ‘&sql_id’ /

Oracle, SQL scripts

How to know current SID

Posted on 30-Aug-2006 By Admin No Comments on How to know current SID

SQL> select distinct sid from v$mystat; SID ———- 1365

Oracle, SQL scripts

get_vmstat.ksh for Solaris

Posted on 17-Aug-2006 By Admin No Comments on get_vmstat.ksh for Solaris

#!/bin/ksh -x # First, we must set the environment . . . . ORACLE_SID=WEBP18F export ORACLE_SID ORACLE_HOME=`cat /var/opt/oracle/oratab|grep ^$ORACLE_SID:|cut -f2 -d’:’` export ORACLE_HOME PATH=$ORACLE_HOME/bin:$PATH export PATH SERVER_NAME=`uname -a|awk ‘{print $2}’` typeset -u SERVER_NAME export SERVER_NAME # sample every five minutes (300 seconds) . . . . SAMPLE_TIME=30 while true do vmstat ${SAMPLE_TIME} 2 > /tmp/msg$$…

Read More “get_vmstat.ksh for Solaris” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 18 19 20 … 35 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
  • AWR settings- MMON is not taking snapshot. Oracle
  • Export Oracle data and Compress at same time Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • exp syntax in oracle 10g Oracle
  • Temporary Tablespace Information and restriction. Oracle
  • Resolving RMAN Hung Jobs Oracle
  • To see mem usage and CPU usage system wide. Linux/Unix
  • .profile Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme