ORA-20001: Cannot Drop Object Error Dropping Materialized View (Doc ID 1931180.1)

Last updated on OCTOBER 08, 2014

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1.0 to 11.2.0.4 [Release 11.2]
PL/SQL - Version 11.2.0.0 to 11.2.0.4
Information in this document applies to any platform.

Symptoms

 STEPS TO REPRODUCE PROBLEM:
============================
create table sgstest11 (id number);
create materialized view sgstest11_mv refresh complete with rowid as select * from sgstest11;
---set tracing on
ALTER SESSION SET tracefile_identifier='dropmview';
ALTER SESSION SET MAX_DUMP_FILE_SIZE = unlimited;
ALTER SESSION SET  events '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12';
alter session set events '20001 trace name errorstack level 3';
drop materialized view sgstest11_mv;
--unset tracing
ALTER SESSION SET  events '10046 TRACE NAME CONTEXT OFF';
alter session set events '20001 trace name errorstack off;

The trace file shows the following:

----- Error Stack Dump -----
ORA-20001: Cannot drop object
----- Current SQL Statement for this session (sql_id=c4kz8gjwthzzh) -----
BEGIN
  RAISE_APPLICATION_ERROR (
     num => -20001,
     msg => 'Cannot drop object');
END;
----- PL/SQL Stack -----
----- PL/SQL Call Stack -----
object      line  object
handle    number  name
7000007874cbf60         2  anonymous block

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms