Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • TRUNCATE table and disabling referential constraints. Oracle
  • scripts to take listener.log backup Linux/Unix
  • Python class import from different folders Python/PySpark
  • tar and untar a dolder with all its subfolder. Linux/Unix
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • Proc code Oracle
  • Histogram information Oracle
  • oracle 10g on linux Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • cur_sql.sql Oracle
  • When error comes for temporary tablespace with version <= 9i Oracle
  • dbms_job.submit example Oracle
  • Rollback force for distributed transactions Oracle
  • More info about /proc folder and its relation with processes. Linux/Unix

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

  • How to set Processes Parameter Oracle
  • Oracle Statspack survival Guide Oracle
  • DBMS_STATS Metalinks Notes Oracle
  • How to find the real execution plan and binds used in that explain plan in Oracle 10g?? Oracle
  • Committing distributed transaction using commit force Oracle
  • AWR settings- MMON is not taking snapshot. 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 (150)
  • MYSQL (5)
  • Oracle (403)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (151)
  • SQL scripts (349)
  • SQL Server (6)
  • Uncategorized (5)
  • Videos (0)

Recent Posts

  • Key Management in Oracle: The Core Issue: Missing Master Key12-May-2026
  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sh23-Apr-2026
  • 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

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • before_trunc.sql Before Truncate table needs to execute following: Oracle
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix
  • Export Oracle data and Compress at same time Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • Good Doc 28-JUN-2006 Oracle
  • set_env_dba Linux/Unix
  • My Minimum Tuning Programs Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme