12.2 : ORA-65344 error while Uninstalling Application Container

(Doc ID 2290928.1)

Last updated on AUGUST 21, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

Symptoms

Error ORA-65344 received while application container unistall

SQL> alter pluggable database application appbug end uninstall;
 alter pluggable database application appbug end uninstall
 *
 ERROR at line 1:
 ORA-65344: cannot uninstall an application that has objects, users, roles, and  profiles

Changes

Below steps describe about how this error return

SQL> alter pluggable database application appbug begin install '1.0';

Pluggable database altered.

SQL> drop user appbugusr cascade;
drop user appbugusr cascade
*
ERROR at line 1:
ORA-1918: user 'APPBUGUSR' does not exist

SQL> create user appbugusr identified by appbugusr;

User created.

SQL> CREATE OR REPLACE FUNCTION appbug_func (v_schema IN VARCHAR2, v_objname
 IN VARCHAR2)
 2 RETURN VARCHAR2 AS
 3 con VARCHAR2 (200);
 4 BEGIN
 5 con := 'deptno in (select deptno from appbugusr.metatab)';
 6
 7 RETURN (con);
 8 END appbug_func;
 9 /
 
 Function created.
 
 SQL> show errors;
 No errors.

SQL> alter pluggable database application appbug end install '1.0';

Pluggable database altered.

SQL> conn sys/knl_test7@cdb1_froot1_fpdb1 as sysdba
 Connected.
SQL> alter pluggable database application appbug sync;

Pluggable database altered.

SQL> -- cleanup
SQL> conn sys/knl_test7@cdb1_froot1 as sysdba
Connected.

SQL> column owner format a20
SQL> column object_name format a30
SQL> column object_type format a20
SQL>
SQL> select owner, object_name, object_type
from dba_objects
where created_appid in (select app_id from dba_applications where app_name = 'APPBUG');

 OWNER OBJECT_NAME OBJECT_TYPE
 -------------------- ------------------------------ --------------------
 SYS APPBUG_FUNC FUNCTION
 
 1 row selected.
 
 SQL> alter pluggable database application appbug begin uninstall;
 
 Pluggable database altered.
 
 SQL> drop function sys.appbug_func;
 
 Function dropped.
 
 SQL> drop user appbugusr cascade;
 
 User dropped.
 
 SQL> alter pluggable database application appbug end uninstall;
 alter pluggable database application appbug end uninstall
 *
 ERROR at line 1:
 ORA-65344: cannot uninstall an application that has objects, users, roles, and profiles 

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