Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • sql_plan9i.sql Oracle
  • find_longsql.sql Oracle
  • executing Function from SQLPLUS prompt Oracle
  • How to see which patches are applied. Oracle
  • move_arch_files.ksh Linux/Unix
  • Find Command Linux/Unix
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • Query to Generate aggregate on every 30 mins. Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix
  • Running select from V$ views from remote server Linux/Unix
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle
  • find_pk.sql /* Find Primary Key */ Oracle

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

  • 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
  • block_ident.sql Oracle
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • Good Doc 28-JUN-2006 Oracle
  • Kill a session dynanically using execute immediate Oracle
  • SQL Server: How to see current transactions or requests SQL Server
  • Caching sequence in Memory Oracle
  • Good notes on Oracle Events Oracle
  • Database link password in user_db_links Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme