Sunday, July 11, 2021

Fix 'appl_prinicipal' pre-upgrade check

Before upgrading a database to Oracle 19c, you will need to run ‘preupgrade_fixup.sql’ script to verify if there are any checks to be resolved.
If “appl_principal” pre-upgrade check is identified, then below is the solution for it:

 

i.        It is strongly advised by Oracle to remove any application principals before upgrading the database to 19c.  Delete user names and roles using procedure delete_application_principal from package xdb.dbms_xdbz.

 

SQL> select name, isrole from xdb.app_users_and_roles;

 

NAME

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ISR

---

AUTHENTICATED

YES

 

AUTHORIZED

YES

 

 

ii.             Both the principals “AUTHENTICATED” and “AUTHORIZED” does not exists in 19c DB. So, it needs to be dropped using the below commands:

 

SQL> declare

   v_res boolean;

begin

   v_res :=   xdb.dbms_xdbz.delete_application_principal(name => 'AUTHORIZED');

   commit;

 end;

/

 

SQL> declare

   v_res boolean;

begin

   v_res :=   xdb.dbms_xdbz.delete_application_principal(name => 'AUTHENTICATED');

   commit;

 end;

/


iii.             Now, rerun ‘preupgrade_fixup.sql’ script to make sure that pre-upgrade check which was ‘Further DBA action’ is now ‘None’.