Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • executing Function from SQLPLUS prompt Oracle
  • USER_TABLES.Freelists Oracle
  • Multiple listeners Oracle
  • Adding a new disk and mount it automatically. on VMWARE LINUX Linux/Unix
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • telnet listening Linux/Unix
  • Oracle Release Explaination Oracle
  • Insert cause enqueue locks Oracle
  • Jai Shree Ram Linux/Unix
  • find_idle_cpu.sql Oracle
  • Identical Dblink Issue… Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • Looping for remote servers and find its database from oratab file. Linux/Unix
  • temp_use.sql diplays usage of temp ts Oracle
  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql 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 data_object_id is changing for the involved objects while queries are

being executed.

data_object_id is commonly changed by:

truncate table

alter index .. rebuild

alter table .. move

etc.

I manually checked for data_object_id for TRUN.ATS_CTI_EXT_CHECK and found that after each truncate the DATA_OBJECT_ID of this object is changed. So queries that are running at the time of truncate will receive this error.

Solution:

1. Stop the queries while truncate is going on for same table.

2. If above is not possible or difficult to implement, then replace “truncate” with “delete from”. This will result in segment fragmentation. At night time when no one is running query against this table, also plan to truncate it so its data structure will not be fragmented.

Metalink Reference: Note:268302.1

Oracle, SQL scripts

Post navigation

Previous Post: fdisk -l explaination about Primary-Logical-Extended Partitions
Next Post: good linux notes

Related Posts

  • Oracle Data Direct to TAPE Oracle
  • standard Monitoring – 1 Oracle
  • sess_server.sql Oracle
  • How to find password change date for user Oracle
  • JSON/XML Types in Oracle Oracle
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • before_trunc.sql Before Truncate table needs to execute following: Oracle
  • V$CONTROLFILE_RECORD_SECTION reference notes. Oracle
  • SQLPLUS COPY command Precautions. Oracle
  • arch_configUOCIOTTO.ora Oracle
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • DETERMINING WHICH INSTANCE OWNS WHICH SHARED MEMORY & SEMAPHORE SEGMENTS Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • SYSOPER Mystery Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme