Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • DBMS_UTILITY PACKAGE Oracle
  • tuning commmand for cpu, ip and memory stats Linux/Unix
  • sid_wise_sql.sql Further explaination Oracle
  • scripts to take listener.log backup Linux/Unix
  • Export Import with QUERY Oracle
  • Error Handling in Proc Oracle
  • Finding Oracle Patches with opatch Oracle
  • Check Oracle installed products using one command Oracle
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • Goldengate Tutorial Oracle
  • sess1.sql Oracle
  • scripts to take listener.log backup Linux/Unix
  • find_longsql.sql Oracle
  • How to start CRS manually Oracle
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle

Category: SQL scripts

Insert cause enqueue locks

Posted on 23-Apr-2008 By Admin No Comments on Insert cause enqueue locks

Here is a much simpler version: ——————————- Create table t1 (c1 number primary); session1: insert into t1 values (1); session2: insert into t1 values (1); — would hang v$lock would reveal session 1 blocking session2 on TX lock why? because you have a constraint where you are asking Oracle to check uniqueness of data (unique…

Read More “Insert cause enqueue locks” »

Oracle, SQL scripts

Reclaim temp tablespace for oracle 8, 8i

Posted on 14-Apr-2008 By Admin No Comments on Reclaim temp tablespace for oracle 8, 8i

Case 1:- Allocate More space to temp tablespace before starting the analyze. U can reclaim space by doing. Alter tablespace temp offline; Alter tablespace temp online; Alter tablespace temp coaelsce; Case 2:- If there is some spcace then allocate around 10 GB of space to TEMP .

Oracle, SQL scripts

Temporary tablespace explaination

Posted on 10-Apr-2008 By Admin No Comments on Temporary tablespace explaination

A new mechanism to control the allocation of temporary storage space was introduced in 7.3, initially as support for OPS, but it is equally applicable to non-OPS environments. This requires the creation of a designated temporary tablespace, that is one created with the designation TEMPORARY. The effect of this is twofold: 1. No permanent objects…

Read More “Temporary tablespace explaination” »

Oracle, SQL scripts

ORA-8031 issue and solution if it is occuring due to truncate.

Posted on 07-Apr-2008 By Admin No Comments on ORA-8031 issue and solution if it is occuring due to truncate.

After doing further research on Oracle errors from metalink, I found following for ORA-8031. CAUSE: The data_object_id (seg/obj) stored in the block is different than the data_object_id stored in the segment header. EXPLAINATION: The expected behavior can be that tables are being truncated while a query from those tables is still in execution. Look if…

Read More “ORA-8031 issue and solution if it is occuring due to truncate.” »

Oracle, SQL scripts

Drop database in Oracle 10g

Posted on 04-Apr-2008 By Admin No Comments on Drop database in Oracle 10g

Dropping a Database in 10G Consists of the following steps. echo $ORACLE_SID sqlplus “/as sysdba” SQL> startup nomount; ORACLE instance started. Total System Global Area 1077936128 bytes Fixed Size 2034344 bytes Variable Size 427824472 bytes Database Buffers 633339904 bytes Redo Buffers 14737408 bytes SQL> alter database mount exclusive; Database altered. SQL> alter system enable restricted…

Read More “Drop database in Oracle 10g” »

Oracle, SQL scripts

Remove duplicate rows from table

Posted on 15-Jan-2008 By Admin No Comments on Remove duplicate rows from table

declare cursor c1 is select distinct PRODUCT_SKU, FIT_ID from geo_florist order by PRODUCT_SKU, FIT_ID; begin for cur1 in c1 loop delete from geo_florist a where a.rowid != ( select max(b.rowid) from geo_florist b where a.product_sku = b.product_sku and a.fit_id = b.fit_id) and a.product_sku = cur1.product_sku and a.fit_id = cur1.fit_id; if (mod(c1%rowcount, 1000) = 0) then…

Read More “Remove duplicate rows from table” »

Oracle, SQL scripts

How to analyze statspack or AWR report.

Posted on 14-Dec-2007 By Admin No Comments on How to analyze statspack or AWR report.

http://oraperf.sourceforge.net/seminar/sevt_anal.html A typical waits event section of a report.txt looks like SQLDBA> Rem System wide wait events. SQLDBA> select n1.event “Event Name”, 2> n1.event_count “Count”, 3> n1.time_waited “Total Time”, 4> (n1.time_waited/n1.event_count) “Average Time” 5> from stats$event n1 6> where n1.event_count > 0 7> order by n1.time_waited desc; Event Name Count Total Time Average Time —————————…

Read More “How to analyze statspack or AWR report.” »

Oracle, SQL scripts

v$event_name

Posted on 14-Dec-2007 By Admin No Comments on v$event_name

v$event_name ——————————————————————————– select EVENT# NU,NAME,PARAMETER1 P1,PARAMETER2 P2,PARAMETER3 P3 from v$event_name; EVENT# NAME PARAMETER1 PARAMETER2 PARAMETER3 —- —————————————- ——————– —————– ————- 0 Null event 1 latch activity address number process# 2 latch free address number tries 3 free process state object 4 pmon timer duration 5 inactive session session# waited 6 process startup type process# waited…

Read More “v$event_name” »

Oracle, SQL scripts

Good notes for shared pool

Posted on 14-Dec-2007 By Admin No Comments on Good notes for shared pool

Understanding and Tuning the Shared Pool Doc ID: Note:62143.1

Oracle, SQL scripts

Export With Query Another Example.

Posted on 30-Nov-2007 By Admin No Comments on Export With Query Another Example.

exp userid=mesg file=mesg_26NOV07.dmp log=mesg_26NOV07.log compress=N grants=N tables=TX_GIFT_CERTIFICATE,TX_PRODUCT_ZIP_CONF IG,TX_GIFT_CERTIFICATE_CHANNE statistics=none query=”where dt_crtd >= sysdate – 10″

Oracle, SQL scripts

Posts pagination

Previous 1 … 13 14 15 … 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
  • get_vmstat_linux Oracle
  • initUOCIOTTO.ora Oracle
  • Oracle 10g Wait Model Oracle
  • Test Case for Inserting Multiple (2.3 Million rows in 26 Seconds) Oracle
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • This is im telling Kishore Oracle
  • Find all users who have DML privileges Oracle
  • Guide to Linux System Command Mastery Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme