ORA-14466: Data in a read-only partition or subpartition cannot be modified

Error:

SQL> delete from scott.tran where created_date=to_date('01.01.2016','dd.mm.yyyy');
delete from scott.tran where created_date=to_date('01.01.2016','dd.mm.yyyy')
            *
ERROR at line 1:
ORA-14466: Data in a read-only partition or subpartition cannot be modified.

Solution:

For deleting the date from scott.tran table, you need to modify the read only partition to read write state.

1. Find the read-only partition from table.

col PARTITION_NAME for a32
select partition_name, read_only from dba_tab_partitions where table_name='TRAN' and read_only = 'YES';

2. Convert the read only partition to read write.

SQL> alter table tran modify partition tran_201601 read write;

Script for converting all read-only partition to read-write for a table.

SELECT 'ALTER TABLE '||table_name||' MODIFY PARTITION '||partition_name ||' READ WRITE;' from dba_tab_partitions where read-only = 'YES';

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.