Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Very clear article about oracle dataguard Oracle
  • Insert cause enqueue locks Oracle
  • SQLPLUS COPY command Precautions. Oracle
  • Nice notes on wait events Oracle
  • V$transaction notes for finding XID composition. Oracle
  • Database logon trigger issue Oracle
  • 10g oem configuration Oracle
  • Jai Shree Ram Oracle
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • runsql_once.ksh Linux/Unix
  • S3 Basic info AWS
  • kill all processes from specific user in solaris. Linux/Unix
  • Very Good Oralce Internal Tuning Book Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • When to rebuld B-tree index 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

  • JSON/XML Types in Oracle Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • Configure ssh authentications for RAC Oracle
  • Facts about SCN and Rollback Segment Oracle
  • Oracle Metalink useful notes Oracle
  • How to find password change date for user 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 (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • fuser to check who is using diretory Linux/Unix
  • telnet listening Linux/Unix
  • TNSNAMES entries details Oracle
  • Difference between SYNC and AFFIRM Oracle
  • oradebug ipcrm ipcs Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • Benefits and Usage of RMAN with Standby Databases Oracle
  • switchlogfile.sh Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme