Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Resolving RMAN Hung Jobs Oracle
  • Optimizer_Index init.ora parameter explaination. Oracle
  • PLSQL Table Syntax 2 Oracle
  • find the files that are 1 day old. Linux/Unix
  • New OFA for 11g Oracle
  • Find Stale DR Physical Standby Oracle
  • Good Doc 28-JUN-2006 Oracle
  • standard Monitoring – 1 Oracle
  • Linux CPU info. Linux/Unix
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • checking connectivity between two servers Linux/Unix
  • Flowers Resize datafiles Oracle
  • oracle_env_10g_CADEV Linux/Unix
  • Export With Query Another Example. Oracle
  • rm_backup_arch_file.ksh Linux/Unix

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

  • 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
  • Generate SSH without password authentication. Linux/Unix
  • sess1.sql Oracle
  • Remove DOS CR/LFs (^M) Linux/Unix
  • SQL_PLAN.sql for checking real execution plan Oracle
  • Guide to Linux System Command Mastery Linux/Unix
  • moving lob object to other tablespace lob_mvmt.sql Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • MYSQL for Oracle DBA MYSQL

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme