Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Sending SQLPLUS output in HTML format Oracle
  • refre.sql Oracle
  • 339939.1 Running Cluster Verification Utility to Diagnose Install Problems Oracle
  • Oracle 11g RAC on OEL 5 and Vmware 2 Oracle
  • Important Solaris Commands Linux/Unix
  • send attachment from unix-shell script Linux/Unix
  • USER_TABLES.Freelists Oracle
  • How to analyze statspack or AWR report. Oracle
  • Renaming Global Name GLOBAL_NAME Oracle
  • find_open_cur.sql Find open cursorts per session Oracle
  • How to find where datafile is created dbf_info.sql Oracle
  • Jai Shree Ram Oracle
  • on IBM-AIX for display Linux/Unix
  • Checking SQL Server Version SQL Server
  • find_err.sql for finding errors from dba_errors. Oracle

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

fdisk -l explaination about Primary-Logical-Extended Partitions

Posted on 06-Apr-2008 By Admin No Comments on fdisk -l explaination about Primary-Logical-Extended Partitions

# fdisk -l Disk /dev/hda: 240 heads, 63 sectors, 1940 cylinders Units = cylinders of 15120 * 512 bytes Device Boot Start End Blocks Id System /dev/hda 1 286 2162128+ c Win95 FAT32 (LBA) /dev/hda2 * 288 1940 12496680 5 Extended /dev/hda5 288 289 15088+ 83 Linux /dev/hda6 290 844 4195768+ 83 Linux /dev/hda7 845…

Read More “fdisk -l explaination about Primary-Logical-Extended Partitions” »

Linux/Unix, shell

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

find the files that are 1 day old.

Posted on 15-Feb-2008 By Admin No Comments on find the files that are 1 day old.

find . -name “*” -type f -mtime -1 -exec ls -rlt {} ;

Linux/Unix, shell

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

on IBM-AIX for display

Posted on 08-Jan-2008 By Admin No Comments on on IBM-AIX for display

On IBM-AIX, vi was not working properly. Then set the environment variable as following and it started working. ( Thanks Magesh for same). $ export TERM=vt100 $

Linux/Unix, shell

Unix split command to split files

Posted on 28-Dec-2007 By Admin No Comments on Unix split command to split files

split -20 source_filename.lst test1 Above command will split source_filename.lst with every 20 lines. Will create files with 20 lines and with following names. -rw-r–r– 1 oracle dba 41 Dec 28 11:53 test1ag -rw-r–r– 1 oracle dba 2127 Dec 28 11:53 test1af -rw-r–r– 1 oracle dba 2240 Dec 28 11:53 test1ae -rw-r–r– 1 oracle dba 2243…

Read More “Unix split command to split files” »

Linux/Unix, shell

to see when crontab is changed.

Posted on 19-Dec-2007 By Admin No Comments on to see when crontab is changed.

sunflower1/800P>ls -rlt /var/spool/cron/crontabs total 138 -r——– 1 root root 452 Jan 21 2005 lp -rw——- 1 root sys 308 Nov 9 2006 sys -rw——- 1 root sys 317 Aug 20 18:51 adm -rw——- 1 root staff 5605 Oct 9 10:09 bbxuser -rw——- 1 root staff 5126 Oct 9 10:13 bkgr -rw——- 1 root staff 457…

Read More “to see when crontab is changed.” »

Linux/Unix, shell

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

Posts pagination

Previous 1 … 25 26 27 … 57 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
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • My Minimum Tuning Programs Oracle
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • Python class import from different folders Python/PySpark
  • Identical Dblink Issue… Oracle
  • Good Link from metalink 1 Oracle
  • ipcs -l Linux/Unix
  • Implementation of key based authentications Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme