My Oracle Support Banner

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

Last updated on JANUARY 22, 2020

Applies to:

Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
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
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample or bulit-in schema(s), Public Documentation delivered with an Oracle database product or other training material.  Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

 STEPS TO REPRODUCE PROBLEM:
============================
create table <table_name> (id number);
create materialized view <mview_name> refresh complete with rowid as select * from <table_name>;
---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 <mview_name>;
--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

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.