My Oracle Support Banner

12.2 : ORA-65344 error while Uninstalling Application Container (Doc ID 2290928.1)

Last updated on FEBRUARY 19, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata 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 data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner. 

Error ORA-65344 received while application container uninstall

SQL> alter pluggable database application <APPLICATION CONTAINER NAME> end uninstall;
 alter pluggable database application <APPLICATION CONTAINER NAME> 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 <APPLICATION_CONTAINER_NAME> begin install '1.0';

Pluggable database altered.

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

SQL> create user <USER_NAME> identified by <PASSWORD>;

User created.

SQL> CREATE OR REPLACE FUNCTION <FUNCTION_NAME> (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 <USER_NAME>.<TABLE_NAME>)';
 6
 7 RETURN (con);
 8 END <FUNCTION_NAME>;
 9 /
 
 Function created.
 
 SQL> show errors;
 No errors.

SQL> alter pluggable database application <APPLICATION_CONTAINER_NAME> end install '1.0';

Pluggable database altered.

SQL> conn sys/<PASSWORD>@<DB_LINK> as sysdba
 Connected.
SQL> alter pluggable database application <APPLICATION_CONTAINER_NAME> sync;

Pluggable database altered.

SQL> -- cleanup
SQL> conn sys/<PASSWORD>@<DB_LINK> 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 = '<APPLICATION_CONTAINER_NAME>');

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

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
References


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