Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Find nth max and min. Oracle
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • Transfer SQL Profiles from One database to other database. Oracle
  • Display the top 5 salaries for each department using single SQL Oracle
  • Find Multiple levels of object dependencies : depen.sql Oracle
  • Import and export statements Oracle
  • Clean up Oracle
  • All Hints for Oracle Databases Oracle
  • Move WordPress site from one hosting service to other. PHP/MYSQL/Wordpress
  • exp syntax in oracle 10g Oracle
  • Getting started with notebook Python/PySpark
  • How to know current SID Oracle
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle

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

Good Doc 28-JUN-2006

Posted on 28-Jun-2006 By Admin No Comments on Good Doc 28-JUN-2006

Good Doc About UNDO Management: http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:6894817116500 Cache Buffer Chain Latch: http://www.orafaq.com/maillist/oracle-l/2003/02/27/2671.raw

Oracle, SQL scripts

How to stop OCSSD Daemon

Posted on 28-Jun-2006 By Admin No Comments on How to stop OCSSD Daemon

/etc/init.d/init.cssd stop to stop cssd process.

Oracle, SQL scripts

sess_server.sql

Posted on 20-Jun-2006 By Admin No Comments on sess_server.sql

column osuser format a10 column username format a30 column machine format a30 column program format a50 set lines 132 set pages 500 select osuser, username, machine, program from v$session; select machine, username, count(1) from v$session group by machine, username;

Oracle, SQL scripts

My Minimum Tuning Programs

Posted on 20-Jun-2006 By Admin No Comments on My Minimum Tuning Programs

REM ***** gsp.sql ***** REM ***** This is used to get SPID from SID. col username format a30 col machine format a20 col program format a40 accept _sid prompt ‘Enter Oracle Session ID ->’ select a.sid, b.pid, b.spid, a.username,a.program,a.machine from v$session a,V$process b where a.paddr = b.addr and a.sid = &_sid / REM ***** gsq.sql…

Read More “My Minimum Tuning Programs” »

Oracle, SQL scripts

How to find who is using which Rollback segment and how many rows or blocks in that rollback segments,

Posted on 16-Jun-2006 By Admin No Comments on How to find who is using which Rollback segment and how many rows or blocks in that rollback segments,

Using following query, we can estimate # of rows resides in each USN (Rollback Segment) and who fired that transactions. New modified GCU.sql on 16-JUN-2006 /* Get Curent USN */ column start_dt format a20 set lines 132 select /*+ ALL_ROWS */ a.usn, a1.name, a.extents, a.hwmsize, a.status usn_status, to_char(b.start_date, ‘DD-MON-RRRR:HH24:MI:SS’) start_dt, b.status tx_status, c.sid, c.sql_id, b.used_ublk,…

Read More “How to find who is using which Rollback segment and how many rows or blocks in that rollback segments,” »

Oracle, SQL scripts

How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile)

Posted on 12-Jun-2006 By Admin No Comments on How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile)

We can directly resize datafiles TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’; FILE_NAME BYTES —————- ———- /…/dbsGNX.dbf 419430400 TEST.SQL>ALTER DATABASE DATAFILE ‘/…/dbsGNX.dbf’ RESIZE 390M; Database altered. TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’; FILE_NAME BYTES ————— ———- /…/dbsGNX.dbf 408944640 But the minimum file size is the size of the extend the furthest in the datafile:…

Read More “How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile)” »

Oracle, SQL scripts

How to find the real execution plan and binds used in that explain plan in Oracle 10g??

Posted on 09-Jun-2006 By Admin No Comments on How to find the real execution plan and binds used in that explain plan in Oracle 10g??

Step-1 : Find the Query and its SQL_ID to trace from AWR reports. Step-2 : Execute following query to find real execution plan: 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=’8ska10yfjx4b5′ CONNECT BY PRIOR id = parent_id and sql_id=’8ska10yfjx4b5′;…

Read More “How to find the real execution plan and binds used in that explain plan in Oracle 10g??” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 19 20 21 … 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
  • executing Function from SQLPLUS prompt Oracle
  • Which environment is used by currently running process ( Very good) Linux/Unix
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • Good Site for Oracle Internals Oracle
  • shr1.sql for MTS or Shared server configuration Oracle
  • Debugging Shell FIles Linux/Unix
  • My Test Case On 21-OCT-2005 Oracle
  • Order by with ROWNUM Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme