TROUBLESHOOTING

ORA-20005: object statistics are locked (stattype = ALL)

While running gather stats for a table , got below error.  SQL> BEGIN 2 DBMS_STATS.GATHER_TABLE_STATS ( 3 ownname => ‘DBACLASS’, 4 tabname => ‘TEST2’, 5 cascade => true, —- For collecting stats for respective indexes 6 method_opt=>’for all indexed columns size 1′, 7 granularity => ‘ALL’, 8 estimate_percent =>dbms_stats.auto_sample_size, 9 degree => 8); 10 END; […]

ORA-14074: partition bound must collate higher than that of the last partition

While adding a partition to a partitioned table, got below error.   SQL> alter table dbaclass_QTAB add partition dbaclass_q4 VALUES LESS THAN (TO_DATE(’01-APR-1998′,’DD-MON-YYYY’)); alter table dbaclass_QTAB add partition dbaclass_q4 VALUES LESS THAN (TO_DATE(’01-APR-1998′,’DD-MON-YYYY’)) * ERROR at line 1: ORA-14074: partition bound must collate higher than that of the last partition   SOLUTION: This error occurs […]

ORA-14400: inserted partition key does not map to any partition

While inserting data to a partitioned table, got below error.   SQL> insert into RANGE_TAB values(to_date(‘24032016′,’ddmmyyyy’),100); insert into RANGE_TAB values(to_date(‘24032016′,’ddmmyyyy’),100); * ERROR at line 1: ORA-14400: inserted partition key does not map to any partition   Solution: This error is because, the value which we are trying to insert is not satisfying the partition key […]

ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found

While creating unique index on a table , got below error. SQL> create unique index TEST_IDX on TEST5(EMPNO); create unique index TEST_IDX on TEST5(EMPNO) * ERROR at line 1: ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found   Solution: Find the duplicate rows in the table and delete them. Use below script to delete the duplicate […]

ORA-25152: TEMPFILE cannot be dropped at this time

PROBLEM: While dropping a tempfile got the below error. SQL> alter tablespace TEMP drop tempfile ‘/archive/NONPLUG/NONCDB/temp01.dbf’; alter tablespace TEMP drop tempfile ‘/archive/NONPLUG/NONCDB/temp01.dbf’ * ERROR at line 1: ORA-25152: TEMPFILE cannot be dropped at this time Solution: If we try to drop a tempfile, while active sessions are still using that particular tempfile, then this error hits. […]

ORA-15235: diskgroup mount mode conflicts with existing mount

 PROBLEM: While mounting a diskgroup in restrict mode, got below error:   SQL> alter diskgroup NEWTST mount restricted; alter diskgroup NEWTST mount restricted * ERROR at line 1: ORA-15032: not all alterations performed ORA-15235: diskgroup NEWTST mount mode conflicts with existing mount   Solution: This is because, the diskgroup is dismounted in local node, but […]

ORA-15027: active use of diskgroup precludes its dismount

       While dismounting a diskgroup, got the below error:   SQL> alter diskgroup NEWTST dismount; alter diskgroup NEWTST dismount * ERROR at line 1: ORA-15032: not all alterations performed ORA-15027: active use of diskgroup “NEWTST” precludes its dismount   Solution: There might be some running databases using that diskgroup. check v$asm_client,for active connections […]

ORA-08189: cannot flashback the table because row movement is not enabled

While doing flashback on a table, got below error:   17:13:10 SQL> flashback table dbaclass.DEP_TAB to timestamp sysdate – 1/144; flashback table dbaclass.DEP_TAB to timestamp sysdate – 1/144 * ERROR at line 1: ORA-08189: cannot flashback the table because row movement is not enabled   Solution: To flashback a table, we need to enable row […]

ORA-39142: incompatible version number 4.1 in dump file

      While importing a dump into our 11g database, we got the below error.   impdp dumpfile=test1.dmp logfile=imp1.log directory=t Import: Release 11.2.0.4.0 – Production on Mon Jan 23 08:57:03 2017 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Username: / AS SYSDBA Connected to: Oracle Database 11g Enterprise Edition Release […]

ORA-02266: unique/primary keys in table referenced while truncating table

While truncating a table in database, might face the error ORA-02266 unique key error.   PROBLEM: SQL> truncate table DBACLASS.AAF_USER; truncate table DBACLASS.AAF_USER * ERROR at line 1: ORA-02266: unique/primary keys in table referenced by enabled foreign keys   SOLUTION: The primary key in the table( which we are truncating) , seems to be referring […]