Multitenant : Application PDB status after application container database upgrade on 12.2 version
Application Container database : HR_APP
Application Pluggable database : HR_PDB1
: HR_PDB2
oracle@srv4:~> sqlplus sys/system123@hr_ac as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Wed Aug 26 15:52:02 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
- Connect to root container database and check the application container and pluggable database status
SQL> conn / as sysdba
Connected.
SQL> col name format a20
SQL> SELECT CON_ID, NAME, APPLICATION_ROOT, OPEN_MODE, APPLICATION_ROOT_CON_ID FROM V$PDBS ORDER BY 3,1;
CON_ID NAME APP OPEN_MODE APPLICATION_ROOT_CON_ID
---------- -------------------- --- ---------- -----------------------
2 PDB$SEED NO READ ONLY
3 TEST1 NO READ WRITE
4 PLM1 NO READ WRITE
5 PDBREF NO READ ONLY
6 PROXYPDB NO READ WRITE
8 HR_PDB1 NO READ WRITE 7
9 HR_PDB2 NO READ WRITE 7
7 HR_AC YES READ WRITE
10 F2441155579_21_1 YES READ ONLY 7
9 rows selected.
SQL> col name format a80
SQL> SELECT NAME FROM V$DATAFILE WHERE CON_ID=7;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/SMRCDB/STDRAC/ADB299969CDB0AB5E0534A38A8C0071F/datafile/
o1_mf_system_hn9vs1qd_.dbf
/u01/app/oracle/oradata/SMRCDB/STDRAC/ADB299969CDB0AB5E0534A38A8C0071F/datafile/
o1_mf_sysaux_hn9vs1tf_.dbf
/u01/app/oracle/oradata/SMRCDB/STDRAC/ADB299969CDB0AB5E0534A38A8C0071F/datafile/
o1_mf_undotbs1_hn9vs1tf_.dbf
/u01/app/oracle/oradata/SMRCDB/STDRAC/ADB299969CDB0AB5E0534A38A8C0071F/datafile/
o1_mf_hr_tbs_hn9zsfl1_.dbf
NAME
--------------------------------------------------------------------------------
- Connect to application container database and SYNC application pluggable database.
SQL> ALTER SESSION SET CONTAINER=HR_AC;
Session altered.
SQL> column app_name format a15
column app_version format a5
column app_status format a15
SELECT APP_NAME, APP_VERSION, APP_STATUS FROM DBA_APPLICATIONS WHERE APP_IMPLICIT='N';SQL> SQL> SQL>
APP_NAME APP_V APP_STATUS
--------------- ----- ---------------
HR_APP 2.0 NORMAL
SQL> conn sys/system123@hr_ac as sysdba
Connected.
SQL> ALTER SESSION SET CONTAINER= hr_pdb2;
Session altered.
SQL> ALTER PLUGGABLE DATABASE APPLICATION hr_app SYNC;
Pluggable database altered.
SQL> ALTER SESSION SET CONTAINER=hr_pdb1;
Session altered.
SQL> ALTER PLUGGABLE DATABASE APPLICATION hr_app SYNC;
Pluggable database altered.
- Check the status below:
SQL> conn sys/system123@hr_ac as sysdba
Connected.
SQL> col pdb_name format a10
SQL> SELECT PDB.PDB_NAME, APP.APP_NAME, APP.APP_VERSION , APP.APP_STATUS FROM DBA_APP_PDB_STATUS APP, DBA_PDBS PDB WHERE APP.CON_UID=PDB.CON_UID;
PDB_NAME APP_NAME APP_V APP_STATUS
---------- --------------- ----- ---------------
HR_PDB1 HR_APP 2.0 NORMAL
HR_PDB2 HR_APP 2.0 NORMAL
No comments:
Post a Comment