Forum Stats

  • 3,839,357 Users
  • 2,262,486 Discussions
  • 7,900,949 Comments

Discussions

Applications Containers: Uninstall Apps procedure

Arturo Gutierrez
Arturo Gutierrez Member Posts: 337 Bronze Badge
edited Jul 26, 2019 6:48AM in Multitenant

Hi,

I've several questions about the process to unistall an application from the application root container.

1.The process more similar to remove is uninstall.

ALTER PLUGGABLE DATABASE APPLICATION  CRM_APP begin UNINSTALL;

However, you need manually remove all apps objects like: tablespaces, users etc.

Why not is done automatically?

2. If I try to reuse the same apps name, fails.

ALTER PLUGGABLE DATABASE APPLICATION crm_app begin install '1.0'

*

ERROR at line 1:

ORA-65245: application CRM_APP has been uninstalled

Is not possible to remove an apps? May be I may have been wrong, I need to erase it.

3. When I unistall an apps, in the alert log say, that try to create a clone , however my file system doesn't support cloning, but create a physical clone on the file system

CRM_ROOT(4):ALTER PLUGGABLE DATABASE APPLICATION  CRM_APP begin UNINSTALL

CREATE PLUGGABLE DATABASE "F1715659061_21_1" AS APPLICATION CONTAINER from "CRM_ROOT" CREATE_FILE_DEST='/u01/app/oracle/oradata/CDB1/CRM_ROOT/' SNAPSHOT COPY STANDBYS=NONE

2019-06-11T21:55:15.088156+02:00

CRM_ROOT(4): AUDSYS.AUD$UNIFIED (SQL_TEXT) - CLOB populated

2019-06-11T21:55:15.139868+02:00

CRM_ROOT(4):Errors in file /u01/app/oracle/diag/rdbms/cdb1/CDB1/trace/CDB1_p001_2219.trc:

ORA-17525: Database clone using storage snapshot not supported on file /u01/app/oracle/oradata/CDB1/CRM_ROOT/crm_tbs.dbf

And finally I see at OS, the clone.

ls -ltr /u01/app/oracle/oradata/CDB1/CRM_ROOT/CDB1/8B12ACE584C90FCAE053BEE4A8C0BEB7/datafile/

total 839768

-rw-r-----. 1 oracle oinstall  37756928 Jun 11 21:55 o1_mf_temp_gj01s35y_.dbf

-rw-r-----. 1 oracle oinstall 104865792 Jun 11 21:55 o1_mf_crm_tbs_gj01s35y_.dbf

-rw-r-----. 1 oracle oinstall 104865792 Jun 11 21:55 o1_mf_undotbs1_gj01s35x_.dbf

-rw-r-----. 1 oracle oinstall 367009792 Jun 11 21:55 o1_mf_sysaux_gj01s35x_.dbf

-rw-r-----. 1 oracle oinstall 283123712 Jun 11 21:55 o1_mf_system_gj01s35w_.dbf

4. Exists any view to track all the objects associated to an apps?

Many thanks and sorry my high number of questions.

Arturo

Answers

  • jkstill
    jkstill Member Posts: 18 Blue Ribbon
    edited Jul 16, 2019 2:34PM

    Please include version information.

    I have run into the same issue on 18c.

    There is no mention of this error in My Oracle Support.

  • Arturo Gutierrez
    Arturo Gutierrez Member Posts: 337 Bronze Badge
    edited Jul 17, 2019 10:35AM

    Hello,

    I'm working with  Oracle 19c.

    Arturo

  • Markus Flechtner
    Markus Flechtner Member Posts: 503 Bronze Trophy
    edited Jul 17, 2019 5:19PM

    Hi

    when you uninstall your application in your application root, Oracle creates a clone of your application root because there may be application PDBs which are using the application.

    Markus

  • Arturo Gutierrez
    Arturo Gutierrez Member Posts: 337 Bronze Badge
    edited Jul 26, 2019 6:48AM

    Hi,

    Okay, but just like the PDBs are synchronized to update to a new version, it should be able to be synchronized to be deleted. Until when the cloning is maintained?

    Thanks

    Arturo

  • User_56FLE
    User_56FLE Member Posts: 1 Green Ribbon

    Hi Arturo, I've only just seen this thread.

    When an application root clone is created (by application upgrade or uninstall) it's kept for ever by default, even after all the application PDBs have been synced to point to and use the "live" application root. The reason (I think) is in case you needed to a point-in-time recovery of a PDB. For example on a simple timeline:

    • on Monday in the root you create a new app version 1.0, and sync the PDBs to it.
    • on Tuesday you upgrade the app to version 2.0 (and a root clone matching 1.0 is created automatically) and again sync the PDBs to it.
    • Then on Wednesday you PITR/Flashback a PDB to Monday. It will now need to see Monday's version of the root which is only available in the 1.0 clone.

    So over time and several upgrades of maybe big schemas, you have several unwanted root clones taking up lots of disk space.

    The solution is to set the application's compatibility version to the version you want to keep. In my example above, connect to the application root and execute:

    SQL> ALTER PLUGGABLE DATABASE APPLICATION <your-app-name> SET COMPATIBILITY VERSION '2.0';

    Oracle will immediately delete any root clones which were for earlier versions; in my example, that's the 1.0 clone created by the Tuesday upgrade.

    What I still haven't worked out is how to do this after an uninstall of the app.

    Cheers

    Phil