Wednesday, June 28, 2017

install APEX 5.1 in 12.2

1. Notice that APEX is not installed by default since 12.2

fond of installing 5.1 to 12.2

follow the standard step of installation guide , or 
my favorite article 

key things different with installation in 11g is , I need to set container to pluggable database pdb1.

No errors with all steps, however when I launch http://localhost:8080/apex/apex_admin , it prompts for XDB username and password.

Reviewed a few times on previous steps, finally I notice the  account_status of anonymous is EXPIRED, although I issued unlocked command.

while inside the pdb, I attempted to changes its password in order to make it non-expired. 

SYS> alter USER ANONYMOUS identified by oracle123 ;
alter USER ANONYMOUS identified by oracle123
*
ERROR at line 1:
ORA-65066: The specified changes must apply to all containers

as such, I quit back to contained database , and re-issue the command successfully .


SYS> conn / as sysdba
Connected.
SYS> alter USER ANONYMOUS  account unlock;
SYS>  select username, account_status from dba_users where username like 'ANONY%';

USERNAME
--------------------------------------------------------------------------------
ACCOUNT_STATUS
--------------------------------
ANONYMOUS
EXPIRED

SYS> alter USER ANONYMOUS identified by oracle123 ;
SYS>  select username, account_status from dba_users where username like 'ANONY%';

USERNAME
--------------------------------------------------------------------------------
ACCOUNT_STATUS
--------------------------------

ANONYMOUS
OPEN



SYS> alter session set container=pdb1;
SYS>  select username, account_status from dba_users where username like 'ANONY%';

USERNAME
--------------------------------------------------------------------------------
ACCOUNT_STATUS
--------------------------------
ANONYMOUS


SYS> conn / as sysdba
Connected.
SYS> alter USER ANONYMOUS  account unlock;
SYS>  select username, account_status from dba_users where username like 'ANONY%';

USERNAME
--------------------------------------------------------------------------------
ACCOUNT_STATUS
--------------------------------
ANONYMOUS
EXPIRED

SYS> alter USER ANONYMOUS identified by oracle123 ;
SYS>  select username, account_status from dba_users where username like 'ANONY%';

USERNAME
--------------------------------------------------------------------------------
ACCOUNT_STATUS
--------------------------------

ANONYMOUS
OPEN




SYS> alter session set container=pdb1;
SYS>  select username, account_status from dba_users where username like 'ANONY%';

USERNAME
--------------------------------------------------------------------------------
ACCOUNT_STATUS
--------------------------------
ANONYMOUS
OPEN


finally, I changed DEFAULT profile at both container and PDB level, to make password no expired.
SYS> alter profile DEFAULT limit PASSWORD_LIFE_TIME unlimited;


Once ANONYMOUS account is unlocked, I am able to logon APEX smoothly!