Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Rman Notes -1 Oracle
  • Export Oracle data and Compress at same time Oracle
  • The most important Tuning Notes Oracle
  • chk_space_SID.ksh Linux/Unix
  • Disbaling DBA_SCHEDULER_JOBS Oracle
  • plan10g.sql good Oracle
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • find_open_cur.sql Find open cursorts per session Oracle
  • find_longsql.sql Oracle
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • Monitor and Trace Unix processes using truss Linux/Unix
  • telnet listening Linux/Unix
  • Adding a new disk and mount it automatically. on VMWARE LINUX Linux/Unix

Category: Oracle

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

Find average Row Length and other table size calculation. metalink notes

Posted on 24-Jul-2006 By Admin No Comments on Find average Row Length and other table size calculation. metalink notes

Subject: Extent and Block Space Calculation and Usage in V7-V9 Database Doc ID :10640.1

Oracle, SQL scripts

How to choose Driver table in SQL statement

Posted on 20-Jul-2006 By Admin No Comments on How to choose Driver table in SQL statement

Driver table: Take the driver table which returns the less number of rows for predicate with literal valae. For example, Consider the statement below: SELECT SUM(BIP.VALUE) value FROM BSKT_ITEM_CALC_PRICING BIP,BSKT_PRICING_ELEMENT BP WHERE BIP.BASKET_ITEM_ID IN (:”SYS_B_0″) AND BIP.PRICING_ELEMENT_ID = BP.PRICING_ELEMENT_ID AND BP.PRICING_TYPE_CODE = :1; Here SQL> select BASKET_ITEM_ID, count(1) from BSKT_ITEM_CALC_PRICING group by BASKET_ITEM_ID; BASKET_ITEM_ID COUNT(1)…

Read More “How to choose Driver table in SQL statement” »

Oracle, SQL scripts

SQL_PLAN.sql for checking real execution plan

Posted on 20-Jul-2006 By Admin No Comments on SQL_PLAN.sql for checking real execution plan

set lines 132 set pages 1400 SELECT LPAD(‘ ‘,2*(LEVEL-1))||operation||’ ‘||options ||’ ‘||object_name ||’ ‘|| DECODE(id, 0, ‘Cost = ‘||position) “Query Plan” FROM v$sql_plan START WITH id = 0 and sql_id=’4ftvbpzhwkfd8′ and child_number=0 CONNECT BY PRIOR id = parent_id and sql_id=’4ftvbpzhwkfd8′ and child_number=0;

Oracle, SQL scripts

Posts pagination

Previous 1 … 22 23 24 … 40 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
  • backspace in SQL Plus not working then..? Linux/Unix
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • Jai Shree Ram Oracle
  • Oracle vs MYSQL Architecture differences (For DBAs) MYSQL
  • All About Trace Fils Oracle
  • catting.sh Linux/Unix
  • FGA Part-I Oracle
  • plan10g.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme