Saturday, August 21, 2021


 How to create your 21c Oracle Database in your Oracle VirtualBox VMs:


In my previous video, I demonstrated how to install Oracle 21c RDBMS binaries through silent mode.


Now that you have successfully deployed the binaries, the next step is to create a database.


Generally speaking, you would have 3 options to go..


1. Create a RMAN backup on DBaaS and restore it on your VM.

2. Create the Database using catalog / catproc approach.

3. Create with DBCA.


Option 3 is the easiest one and very straightforward approach and that would be my first choice. Only a single one named "seed_db.dbc" which is bases on ASM and cannot be used in this lab scenario.


So, we are only left with option 1 or 2. I will go with option 2 as I want a brand new and clean one.


The High Level Steps are:


1. Create the parameter file.

2. Create the database using CREATE DATABASE syntax.

3. Run catalog & catproc on CDB e PDBS.

4. Create the SPFILE


1. Create the parameter file.


cat > initsrcdb21c.ora <<'EOF'

db_name='srcdb21c'

memory_target=2G

processes = 150

db_block_size=8192

db_domain=''

db_create_file_dest='/oradata/data'

db_create_online_log_dest_1='/oradata/data'

db_recovery_file_dest='/oradata/fra'

db_recovery_file_dest_size=2G

diagnostic_dest='/u01/app/oracle'

dispatchers='(PROTOCOL=TCP) (SERVICE=srcdb21cXDB)'

open_cursors=300 

remote_login_passwordfile='EXCLUSIVE'

undo_tablespace='UNDOTBS1'

control_files = '/oradata/data/control01.ctl'

enable_pluggable_database=TRUE

encrypt_new_tablespaces=DDL

wallet_root='/u01/app/oracle/wallet'

tde_configuration="KEYSTORE_CONFIGURATION=FILE"

EOF


Prepare the Instance:


First create the folders for oradata, fra and DB wallet:


[oracle@srlab21c /]$ mkdir -p /oradata/data /oradata/fra /oradata/archive

[oracle@srlab21c /]$ mkdir -p /u01/app/oracle/wallet/tde


Now start the DB in nomount:


[oracle@srlab21c dbs]$ export ORACLE_HOME=/u01/app/oracle/product/21.0.0.0/db_1

[oracle@srlab21c dbs]$ export ORACLE_SID=srcdb21c

[oracle@srlab21c dbs]$ env |grep ORA


[oracle@srlab21c dbs]$ sqlplus / as sysdba


SQL> create spfile from pfile;


SQL> startup nomount;


Create your Wallet:


It's usually recommended to have the Oracle Wallet properly configured before creating the database


SQL> administer key management create keystore '/u01/app/oracle/wallet/tde' identified by welcome1;


SQL> set lines 1000 pages 1000

SQL> col WRL_PARAMETER for a30

SQL> select WRL_TYPE, WRL_PARAMETER, STATUS, CON_ID from v$encryption_wallet;


WRL_TYPE             WRL_PARAMETER                  STATUS                             CON_ID

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

FILE                 /u01/app/oracle/wallet/tde/    CLOSED                                  1


SQL> administer key management create auto_login keystore from keystore '/u01/app/oracle/wallet/tde' identified by welcome1;


SQL> select WRL_TYPE, WRL_PARAMETER, STATUS, CON_ID from v$encryption_wallet;


WRL_TYPE             WRL_PARAMETER                  STATUS                             CON_ID

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

FILE                 /u01/app/oracle/wallet/tde/    OPEN_NO_MASTER_KEY                      1


I will run the following command to create my 21c database control file:


vi create_database.sql


CREATE DATABASE srcdb21c

 USER SYS IDENTIFIED BY Oracle21_

 USER SYSTEM IDENTIFIED BY Oracle21_

 LOGFILE

  GROUP 1 SIZE 100M BLOCKSIZE 512,

  GROUP 2 SIZE 100M BLOCKSIZE 512,

  GROUP 3 SIZE 100M BLOCKSIZE 512

 MAXLOGHISTORY 1

 MAXLOGFILES 16

 MAXLOGMEMBERS 3

 MAXDATAFILES 1024

 CHARACTER SET AL32UTF8

 NATIONAL CHARACTER SET AL16UTF16

 EXTENT MANAGEMENT LOCAL

 DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

 SYSAUX DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

 DEFAULT TABLESPACE users DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

 DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

 UNDO TABLESPACE undotbs1 DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

 USER_DATA TABLESPACE usertbs DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

 ENABLE PLUGGABLE DATABASE

 SEED

  SYSTEM DATAFILES SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

  SYSAUX DATAFILES SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

/

SQL> @create_database.sql


Create the Catalog


Finally, I will create and setup my catalog.


First start the DB in upgrade mode:


SQL> startup upgrade;


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       MIGRATE    YES

SQL>


Now call the catctl:


[oracle@lab21c ~]$ mkdir -p /home/oracle/log

[oracle@lab21c ~]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catctl.pl \

-d $ORACLE_HOME/rdbms/admin \

-n 2 \

-c 'CDB$ROOT PDB$SEED' \

-l /home/oracle/log \

catpcat.sql



Now that the process is completed. Restart the database to remove the upgrade mode and recompile any invalid objects:


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       MIGRATE    YES


SQL> shut immediate;


SQL> startup;


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO


SQL> select count(*) from cdb_objects where status='INVALID';

  COUNT(*)

----------

         0

Finally, you can create your first PDB from Seed:


SQL> CREATE PLUGGABLE DATABASE SRCDB21CPLUG ADMIN USER pdb_adm IDENTIFIED BY Password1;


SQL> show pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO

         3 SRCDB21CPLUG                   MOUNTED


SQL> alter pluggable database RCDB21CPLUG open READ WRITE;


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO

         3 SRCDB21CPLUG                   READ WRITE NO


Oracle 21c Database Creation Work Logs:

[oracle@srlab21c dbs]$ sqlplus / as sysdba

SQL*Plus: Release 21.0.0.0.0 - Production on Sun Aug 15 15:11:07 2021
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> create spfile='/u01/app/oracle/product/21.0.0.0/db_1/dbs/spfilesrcdb21c.ora' from pfile='/u01/app/oracle/product/21.0.0.0/db_1/dbs/initsrcdb21c.ora';

File created.

SQL> ! ls -lrt
total 12
-rwxr-xr-x. 1 oracle oinstall 3079 May 14  2015 init.ora
-rwxr-xr-x. 1 oracle oinstall  589 Aug 15 15:03 initsrcdb21c.ora
-rw-r-----. 1 oracle oinstall 2560 Aug 15 15:12 spfilesrcdb21c.ora

SQL> startup nomount;
ORA-12791: The oradism utility does not have proper permissions.
SQL> shut immediate;
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 4775
Additional information: -451844821
Process ID: 0
Session ID: 0 Serial number: 0


SQL> exit
Disconnected
[oracle@srlab21c dbs]$
[oracle@srlab21c dbs]$ ps -ef |grep pmon
oracle   13165  2774  0 15:16 pts/1    00:00:00 grep --color=auto pmon
[oracle@srlab21c dbs]$
[oracle@srlab21c dbs]$ sqlplus / as sysdba

SQL*Plus: Release 21.0.0.0.0 - Production on Sun Aug 15 15:16:35 2021
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORA-12791: The oradism utility does not have proper permissions.
SQL> shut immediate;
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 4775
Additional information: -451844821
Process ID: 0
Session ID: 0 Serial number: 0


SQL> exit
Disconnected
[oracle@srlab21c dbs]$ sqlplus / as sysdba

SQL*Plus: Release 21.0.0.0.0 - Production on Sun Aug 15 15:17:26 2021
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORA-12791: The oradism utility does not have proper permissions.
SQL> exit
Disconnected
[oracle@srlab21c dbs]$
[oracle@srlab21c dbs]$ sqlplus / as sysdba

SQL*Plus: Release 21.0.0.0.0 - Production on Sun Aug 15 15:20:44 2021
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 2147480144 bytes
Fixed Size                  9687632 bytes
Variable Size            1207959552 bytes
Database Buffers          922746880 bytes
Redo Buffers                7086080 bytes
SQL>
SQL> administer key management create keystore '/u01/app/oracle/wallet/tde' identified by welcome1;

keystore altered.

SQL> set lines 1000 pages 1000
SQL> col WRL_PARAMETER for a30
SQL> select WRL_TYPE, WRL_PARAMETER, STATUS, CON_ID from v$encryption_wallet;

WRL_TYPE             WRL_PARAMETER                  STATUS                             CON_ID
-------------------- ------------------------------ ------------------------------ ----------
FILE                 /u01/app/oracle/wallet/tde/    CLOSED                                  1

SQL> administer key management create auto_login keystore from keystore '/u01/app/oracle/wallet/tde' identified by welcome1;

keystore altered.

SQL> select WRL_TYPE, WRL_PARAMETER, STATUS, CON_ID from v$encryption_wallet;

WRL_TYPE             WRL_PARAMETER                  STATUS                             CON_ID
-------------------- ------------------------------ ------------------------------ ----------
FILE                 /u01/app/oracle/wallet/tde/    OPEN_NO_MASTER_KEY                      1

SQL> CREATE DATABASE srcdb21c
 USER SYS IDENTIFIED BY Oracle21_
 USER SYSTEM IDENTIFIED BY Oracle21_
 LOGFILE
  GROUP 1 SIZE 100M BLOCKSIZE 512,
  GROUP 2 SIZE 100M BLOCKSIZE 512,
  2    3    GROUP 3 SIZE 100M BLOCKSIZE 512
 MAXLOGHISTORY 1
 MAXLOGFILES 16
 MAXLOGMEMBERS 3
 MAXDATAFILES 1024
 CHARACTER SET AL32UTF8
 NATIONAL CHARACTER SET AL16UTF16
 EXTENT MANAGEMENT LOCAL
  4    5   DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
  6    7    8    9   10   11   12   13   14   15   16   SYSAUX DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
 DEFAULT TABLESPACE users DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
 DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
 UNDO TABLESPACE undotbs1 DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
 17   18   19   20   USER_DATA TABLESPACE usertbs DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
 ENABLE PLUGGABLE DATABASE
 21   22   SEED
 23    SYSTEM DATAFILES SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
  SYSAUX DATAFILES SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
 24   25  /

Database created.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup upgrade;
ORACLE instance started.

Total System Global Area 2147480144 bytes
Fixed Size                  9687632 bytes
Variable Size            1207959552 bytes
Database Buffers          922746880 bytes
Redo Buffers                7086080 bytes
Database mounted.
Database opened.
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       MIGRATE    YES
SQL>
SQL> exit
Disconnected from Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
[oracle@srlab21c dbs]$ mkdir -p /home/oracle/log
[oracle@srlab21c dbs]$
[oracle@srlab21c dbs]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catctl.pl \
> -d $ORACLE_HOME/rdbms/admin \
> -n 2 \
> -c 'CDB$ROOT PDB$SEED' \
> -l /home/oracle/log \
> catpcat.sql

Argument list for [/u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin/catctl.pl]
For Oracle internal use only A = 0
Run in                       c = CDB$ROOT PDB$SEED
Do not run in                C = 0
Input Directory              d = /u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin
Echo OFF                     e = 1
Simulate                     E = 0
Forced cleanup               F = 0
Log Id                       i = 0
Child Process                I = 0
Log Dir                      l = /home/oracle/log
Priority List Name           L = 0
Upgrade Mode active          M = 0
SQL Process Count            n = 2
SQL PDB Process Count        N = 0
Open Mode Normal             o = 0
Start Phase                  p = 0
End Phase                    P = 0
Reverse Order                r = 0
AutoUpgrade Resume           R = 0
Script                       s = 0
Serial Run                   S = 0
Classic Upgrade              t = 0
RO User Tablespaces          T = 0
Upgrade PDBs in Upgrade mode x = 0
Display Phases               y = 0
Debug catcon.pm              z = 0
Debug catctl.pl              Z = 0

catctl.pl VERSION: [21.0.0.0.0]
           STATUS: [Production]
            BUILD: [RDBMS_21.3.0.0.0_LINUX.X64_210727]


/u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin/orahome = [/u01/app/oracle/product/21.0.0.0/db_1]
/u01/app/oracle/product/21.0.0.0/db_1/bin/orabasehome = [/u01/app/oracle/homes/OraDB21Home1]
catctlGetOraBaseLogDir = [/u01/app/oracle/homes/OraDB21Home1]

Analyzing file /u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin/catpcat.sql

Log file directory = [/home/oracle/log]

catcon::set_log_file_base_path: ALL catcon-related output will be written to [/home/oracle/log/catpcat_catcon_14347.lst]

catcon::set_log_file_base_path: catcon: See [/home/oracle/log/catpcat*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/home/oracle/log/catpcat_*.lst] files for spool files, if any


Number of Cpus        = 2
Database Name         = srcdb21c
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/home/oracle/log/catpcatcdbroot_catcon_14347.lst]

catcon::set_log_file_base_path: catcon: See [/home/oracle/log/catpcatcdbroot*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/home/oracle/log/catpcatcdbroot_*.lst] files for spool files, if any


Log file directory = [/home/oracle/log]

Parallel SQL Process Count (PDB)      = 2
Parallel SQL Process Count (CDB$ROOT) = 2
Generated PDB Inclusion:[PDB$SEED]
Components in [CDB$ROOT]
    Installed [None]
Not Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT DV EM JAVAVM LCTR MGW ODM OLS ORDIM OWM RAC SDO WK XDB XML XOQ]

------------------------------------------------------
Phases [0-56]         Start Time:[2021_08_15 15:28:17]
Container Lists Inclusion:[CDB$ROOT] Exclusion:[NONE]
------------------------------------------------------
***********   Executing Change Scripts   ***********
Serial   Phase #:0    [CDB$ROOT] Files:1    Time: 1s
***************   Catalog Core SQL   ***************
Serial   Phase #:1    [CDB$ROOT] Files:5    Time: 176s
Restart  Phase #:2    [CDB$ROOT] Files:1    Time: 0s
***********   Catalog Tables and Views   ***********
Parallel Phase #:3    [CDB$ROOT] Files:20   Time: 84s
Restart  Phase #:4    [CDB$ROOT] Files:1    Time: 1s
*************   Catalog Final Scripts   ************
Serial   Phase #:5    [CDB$ROOT] Files:7    Time: 82s
*****************   Catproc Start   ****************
Serial   Phase #:6    [CDB$ROOT] Files:1    Time: 49s
*****************   Catproc Types   ****************
Serial   Phase #:7    [CDB$ROOT] Files:2    Time: 43s
Restart  Phase #:8    [CDB$ROOT] Files:1    Time: 1s
****************   Catproc Tables   ****************
Parallel Phase #:9    [CDB$ROOT] Files:75   Time: 143s
Restart  Phase #:10   [CDB$ROOT] Files:1    Time: 1s
*************   Catproc Package Specs   ************
Serial   Phase #:11   [CDB$ROOT] Files:1    Time: 299s
Restart  Phase #:12   [CDB$ROOT] Files:1    Time: 1s
**************   Catproc Procedures   **************
Parallel Phase #:13   [CDB$ROOT] Files:98   Time: 30s
Restart  Phase #:14   [CDB$ROOT] Files:1    Time: 0s
Parallel Phase #:15   [CDB$ROOT] Files:122  Time: 48s
Restart  Phase #:16   [CDB$ROOT] Files:1    Time: 1s
Serial   Phase #:17   [CDB$ROOT] Files:10   Time: 5s
Restart  Phase #:18   [CDB$ROOT] Files:1    Time: 0s
Parallel Phase #:19   [CDB$ROOT] Files:27   Time: 8s
Restart  Phase #:20   [CDB$ROOT] Files:1    Time: 1s
*****************   Catproc Views   ****************
Parallel Phase #:21   [CDB$ROOT] Files:32   Time: 93s
Restart  Phase #:22   [CDB$ROOT] Files:1    Time: 1s
Serial   Phase #:23   [CDB$ROOT] Files:5    Time: 85s
Restart  Phase #:24   [CDB$ROOT] Files:1    Time: 1s
Parallel Phase #:25   [CDB$ROOT] Files:13   Time: 866s
Restart  Phase #:26   [CDB$ROOT] Files:1    Time: 0s
Serial   Phase #:27   [CDB$ROOT] Files:1    Time: 0s
*****************   Catpdeps PLBs   ****************
Serial   Phase #:28   [CDB$ROOT] Files:14   Time: 5s
Serial   Phase #:29   [CDB$ROOT] Files:1    Time: 0s
Restart  Phase #:30   [CDB$ROOT] Files:1    Time: 0s
Parallel Phase #:31   [CDB$ROOT] Files:13   Time: 510s
Restart  Phase #:32   [CDB$ROOT] Files:1    Time: 0s
Serial   Phase #:33   [CDB$ROOT] Files:1    Time: 0s
Serial   Phase #:34   [CDB$ROOT] Files:5    Time: 10s
Serial   Phase #:35   [CDB$ROOT] Files:1    Time: 0s
Restart  Phase #:36   [CDB$ROOT] Files:1    Time: 0s
***************   Catproc CDB Views   **************
Serial   Phase #:37   [CDB$ROOT] Files:1    Time: 2s
Restart  Phase #:38   [CDB$ROOT] Files:1    Time: 0s
Serial   Phase #:40   [CDB$ROOT] Files:1    Time: 0s
*****************   Catproc PLBs   *****************
Serial   Phase #:41   [CDB$ROOT] Files:306  Time: 60s
Serial   Phase #:42   [CDB$ROOT] Files:1    Time: 0s
Restart  Phase #:43   [CDB$ROOT] Files:1    Time: 1s
Serial   Phase #:44   [CDB$ROOT] Files:15   Time: 19s
Restart  Phase #:45   [CDB$ROOT] Files:1    Time: 0s
***************   Catproc DataPump   ***************
Serial   Phase #:46   [CDB$ROOT] Files:3    Time: 216s
Restart  Phase #:47   [CDB$ROOT] Files:1    Time: 0s
******************   Catproc SQL   *****************
Parallel Phase #:48   [CDB$ROOT] Files:13   Time: 447s
Restart  Phase #:49   [CDB$ROOT] Files:1    Time: 1s
Parallel Phase #:50   [CDB$ROOT] Files:12   Time: 107s
Restart  Phase #:51   [CDB$ROOT] Files:1    Time: 0s
Parallel Phase #:52   [CDB$ROOT] Files:7    Time: 30s
Restart  Phase #:53   [CDB$ROOT] Files:1    Time: 0s
*************   Final Catproc scripts   ************
Serial   Phase #:54   [CDB$ROOT] Files:1    Time: 1203s
Restart  Phase #:55   [CDB$ROOT] Files:1    Time: 1s
Serial   Phase #:56   [CDB$ROOT] Files:1     Time: 2s

------------------------------------------------------
Phases [0-56]         End Time:[2021_08_15 16:45:31]
Container Lists Inclusion:[CDB$ROOT] Exclusion:[NONE]
------------------------------------------------------
Concurrent PDB Upgrades cut in half to 0 due to Replay Upgrade
Concurrent PDB Upgrades reset from [0] to minimum value [1]
Concurrent PDB Upgrades               = 1

Start processing of PDBs (PDB$SEED)
[/u01/app/oracle/product/21.0.0.0/db_1/perl/bin/perl /u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin/catctl.pl -d /u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin -n 2 -c 'PDB$SEED' -l /home/oracle/log -I -i pdb_seed catpcat.sql]

Argument list for [/u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin/catctl.pl]
For Oracle internal use only A = 0
Run in                       c = PDB$SEED
Do not run in                C = 0
Input Directory              d = /u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin
Echo OFF                     e = 1
Simulate                     E = 0
Forced cleanup               F = 0
Log Id                       i = pdb_seed
Child Process                I = 1
Log Dir                      l = /home/oracle/log
Priority List Name           L = 0
Upgrade Mode active          M = 0
SQL Process Count            n = 2
SQL PDB Process Count        N = 0
Open Mode Normal             o = 0
Start Phase                  p = 0
End Phase                    P = 0
Reverse Order                r = 0
AutoUpgrade Resume           R = 0
Script                       s = 0
Serial Run                   S = 0
Classic Upgrade              t = 0
RO User Tablespaces          T = 0
Upgrade PDBs in Upgrade mode x = 0
Display Phases               y = 0
Debug catcon.pm              z = 0
Debug catctl.pl              Z = 0

catctl.pl VERSION: [21.0.0.0.0]
           STATUS: [Production]
            BUILD: [RDBMS_21.3.0.0.0_LINUX.X64_210727]


/u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin/orahome = [/u01/app/oracle/product/21.0.0.0/db_1]
/u01/app/oracle/product/21.0.0.0/db_1/bin/orabasehome = [/u01/app/oracle/homes/OraDB21Home1]
catctlGetOraBaseLogDir = [/u01/app/oracle/homes/OraDB21Home1]

Analyzing file /u01/app/oracle/product/21.0.0.0/db_1/rdbms/admin/catpcat.sql

Log file directory = [/home/oracle/log]

catcon::set_log_file_base_path: ALL catcon-related output will be written to [/home/oracle/log/catpcatpdb_seed_catcon_21056.lst]

catcon::set_log_file_base_path: catcon: See [/home/oracle/log/catpcatpdb_seed*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/home/oracle/log/catpcatpdb_seed_*.lst] files for spool files, if any


Number of Cpus        = 2
Database Name         = srcdb21c
DataBase Version      = 21.0.0.0.0
PDB$SEED Open Mode = [MIGRATE]
Generated PDB Inclusion:[PDB$SEED]
CDB$ROOT  Open Mode = [OPEN MIGRATE]
Components in [PDB$SEED]
    Installed [None]
Not Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT DV EM JAVAVM LCTR MGW ODM OLS ORDIM OWM RAC SDO WK XDB XML XOQ]

------------------------------------------------------
Phases [0-56]         Start Time:[2021_08_15 16:45:50]
Container Lists Inclusion:[PDB$SEED] Exclusion:[NONE]
------------------------------------------------------
***********   Executing Change Scripts   ***********
Serial   Phase #:0    [PDB$SEED] Files:1    Time: 3s
***************   Catalog Core SQL   ***************
Serial   Phase #:1    [PDB$SEED] Files:5    Time: 177s
Restart  Phase #:2    [PDB$SEED] Files:1    Time: 0s
***********   Catalog Tables and Views   ***********
Parallel Phase #:3    [PDB$SEED] Files:20   Time: 69s
Restart  Phase #:4    [PDB$SEED] Files:1    Time: 1s
*************   Catalog Final Scripts   ************
Serial   Phase #:5    [PDB$SEED] Files:7    Time: 60s
*****************   Catproc Start   ****************
Serial   Phase #:6    [PDB$SEED] Files:1    Time: 29s
*****************   Catproc Types   ****************
Serial   Phase #:7    [PDB$SEED] Files:2    Time: 30s
Restart  Phase #:8    [PDB$SEED] Files:1    Time: 0s
****************   Catproc Tables   ****************
Parallel Phase #:9    [PDB$SEED] Files:75   Time: 109s
Restart  Phase #:10   [PDB$SEED] Files:1    Time: 1s
*************   Catproc Package Specs   ************
Serial   Phase #:11   [PDB$SEED] Files:1    Time: 201s
Restart  Phase #:12   [PDB$SEED] Files:1    Time: 1s
**************   Catproc Procedures   **************
Parallel Phase #:13   [PDB$SEED] Files:98   Time: 19s
Restart  Phase #:14   [PDB$SEED] Files:1    Time: 1s
Parallel Phase #:15   [PDB$SEED] Files:122  Time: 26s
Restart  Phase #:16   [PDB$SEED] Files:1    Time: 1s
Serial   Phase #:17   [PDB$SEED] Files:10   Time: 3s
Restart  Phase #:18   [PDB$SEED] Files:1    Time: 0s
Parallel Phase #:19   [PDB$SEED] Files:27   Time: 6s
Restart  Phase #:20   [PDB$SEED] Files:1    Time: 0s
*****************   Catproc Views   ****************
Parallel Phase #:21   [PDB$SEED] Files:32   Time: 57s
Restart  Phase #:22   [PDB$SEED] Files:1    Time: 0s
Serial   Phase #:23   [PDB$SEED] Files:5    Time: 51s
Restart  Phase #:24   [PDB$SEED] Files:1    Time: 0s
Parallel Phase #:25   [PDB$SEED] Files:13   Time: 1490s
Restart  Phase #:26   [PDB$SEED] Files:1    Time: 0s
Serial   Phase #:27   [PDB$SEED] Files:1    Time: 0s
*****************   Catpdeps PLBs   ****************
Serial   Phase #:28   [PDB$SEED] Files:14   Time: 6s
Serial   Phase #:29   [PDB$SEED] Files:1    Time: 0s
Restart  Phase #:30   [PDB$SEED] Files:1    Time: 1s
Parallel Phase #:31   [PDB$SEED] Files:13   Time: 453s
Restart  Phase #:32   [PDB$SEED] Files:1    Time: 0s
Serial   Phase #:33   [PDB$SEED] Files:1    Time: 0s
Serial   Phase #:34   [PDB$SEED] Files:5    Time: 65s
Serial   Phase #:35   [PDB$SEED] Files:1    Time: 0s
Restart  Phase #:36   [PDB$SEED] Files:1    Time: 1s
***************   Catproc CDB Views   **************
Serial   Phase #:37   [PDB$SEED] Files:1    Time: 1s
Restart  Phase #:38   [PDB$SEED] Files:1    Time: 1s
Serial   Phase #:40   [PDB$SEED] Files:1    Time: 0s
*****************   Catproc PLBs   *****************
Serial   Phase #:41   [PDB$SEED] Files:306  Time: 362s
Serial   Phase #:42   [PDB$SEED] Files:1    Time: 0s
Restart  Phase #:43   [PDB$SEED] Files:1    Time: 0s
Serial   Phase #:44   [PDB$SEED] Files:15   Time: 8s
Restart  Phase #:45   [PDB$SEED] Files:1    Time: 0s
***************   Catproc DataPump   ***************
Serial   Phase #:46   [PDB$SEED] Files:3    Time: 155s
Restart  Phase #:47   [PDB$SEED] Files:1    Time: 1s
******************   Catproc SQL   *****************
Parallel Phase #:48   [PDB$SEED] Files:13   Time: 400s
Restart  Phase #:49   [PDB$SEED] Files:1    Time: 1s
Parallel Phase #:50   [PDB$SEED] Files:12   Time: 47s
Restart  Phase #:51   [PDB$SEED] Files:1    Time: 1s
Parallel Phase #:52   [PDB$SEED] Files:7    Time: 29s
Restart  Phase #:53   [PDB$SEED] Files:1    Time: 0s
*************   Final Catproc scripts   ************
Serial   Phase #:54   [PDB$SEED] Files:1    Time: 218s
Restart  Phase #:55   [PDB$SEED] Files:1    Time: 1s
Serial   Phase #:56   [PDB$SEED] Files:1     Time: 2s

------------------------------------------------------
Phases [0-56]         End Time:[2021_08_15 17:53:58]
Container Lists Inclusion:[PDB$SEED] Exclusion:[NONE]
------------------------------------------------------

Grand Total Time: 4097s [PDB$SEED]

     Time: 4634s For CDB$ROOT
     Time: 4127s For PDB(s)

Grand Total Time: 8761s
[oracle@srlab21c dbs]$ sqlplus / as sysdba

SQL*Plus: Release 21.0.0.0.0 - Production on Sun Aug 15 17:55:58 2021
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.


Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       MIGRATE    YES
SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2147480144 bytes
Fixed Size                  9687632 bytes
Variable Size            1308622848 bytes
Database Buffers          822083584 bytes
Redo Buffers                7086080 bytes
Database mounted.
Database opened.
SQL>
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
SQL>
SQL>
SQL> set lines 200 pages 2000
SQL>
SQL> col owner for a20
SQL> col object_name for a40
SQL>
SQL> select count(*) from dba_objects where status='INVALID';

  COUNT(*)
----------
         0

SQL>
SQL> col comp_name for a40
SQL>
SQL> select comp_id,comp_name,version,status from dba_registry;

COMP_ID                        COMP_NAME                                VERSION                        STATUS
------------------------------ ---------------------------------------- ------------------------------ --------------------------------------------
CATALOG                        Oracle Database Catalog Views            21.0.0.0.0                     LOADED
CATPROC                        Oracle Database Packages and Types       21.0.0.0.0                     LOADED
RAC                            Oracle Real Application Clusters         21.0.0.0.0                     OPTION OFF
XDB                            Oracle XML Database                      21.0.0.0.0                     VALID

SQL> col version for a20
SQL> /

COMP_ID                        COMP_NAME                                VERSION              STATUS
------------------------------ ---------------------------------------- -------------------- --------------------------------------------
CATALOG                        Oracle Database Catalog Views            21.0.0.0.0           LOADED
CATPROC                        Oracle Database Packages and Types       21.0.0.0.0           LOADED
RAC                            Oracle Real Application Clusters         21.0.0.0.0           OPTION OFF
XDB                            Oracle XML Database                      21.0.0.0.0           VALID

SQL> @?/rdbms/admin/utlrp.sql

Session altered.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN              2021-08-15 17:58:54

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END              2021-08-15 17:59:05

DOC> The following query reports the number of invalid objects.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of exceptions caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC> Note: Typical compilation errors (due to coding errors) are not
DOC>       logged into this table: they go into DBA_ERRORS instead.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


Function created.


PL/SQL procedure successfully completed.


Function dropped.


PL/SQL procedure successfully completed.

SQL> col comp_name for a40
SQL>
SQL> select comp_id,comp_name,version,status from dba_registry;

COMP_ID                        COMP_NAME                                VERSION              STATUS
------------------------------ ---------------------------------------- -------------------- --------------------------------------------
CATALOG                        Oracle Database Catalog Views            21.0.0.0.0           VALID
CATPROC                        Oracle Database Packages and Types       21.0.0.0.0           VALID
RAC                            Oracle Real Application Clusters         21.0.0.0.0           OPTION OFF
XDB                            Oracle XML Database                      21.0.0.0.0           VALID

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
SQL> alter session set container=PDB$SEED;

Session altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
SQL> select comp_id,comp_name,version,status from dba_registry;

COMP_ID                        COMP_NAME                                VERSION              STATUS
------------------------------ ---------------------------------------- -------------------- --------------------------------------------
CATALOG                        Oracle Database Catalog Views            21.0.0.0.0           LOADED
CATPROC                        Oracle Database Packages and Types       21.0.0.0.0           LOADED
RAC                            Oracle Real Application Clusters         21.0.0.0.0           OPTION OFF
XDB                            Oracle XML Database                      21.0.0.0.0           VALID

SQL> alter session set container=cdb$root;

Session altered.

SQL> alter pluggable database PDB$SEED close immediate;
alter pluggable database PDB$SEED close immediate
                         *
ERROR at line 1:
ORA-65017: seed pluggable database may not be dropped or altered


SQL> alter session set "_oracle_script"=true;

Session altered.

SQL> alter pluggable database PDB$SEED close immediate;

Pluggable database altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       MOUNTED
SQL> alter pluggable database PDB$SEED open read write;

Pluggable database altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ WRITE NO
SQL> alter session set container=PDB$SEED;

Session altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ WRITE NO
SQL>
SQL> @?/rdbms/admin/utlrp.sql

Session altered.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN              2021-08-15 18:02:02

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END              2021-08-15 18:24:43

DOC> The following query reports the number of invalid objects.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of exceptions caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC> Note: Typical compilation errors (due to coding errors) are not
DOC>       logged into this table: they go into DBA_ERRORS instead.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


Function created.


PL/SQL procedure successfully completed.


Function dropped.


PL/SQL procedure successfully completed.

SQL> col comp_name for a40
SQL>
SQL> select comp_id,comp_name,version,status from dba_registry;

COMP_ID                        COMP_NAME                                VERSION              STATUS
------------------------------ ---------------------------------------- -------------------- --------------------------------------------
CATALOG                        Oracle Database Catalog Views            21.0.0.0.0           VALID
CATPROC                        Oracle Database Packages and Types       21.0.0.0.0           VALID
RAC                            Oracle Real Application Clusters         21.0.0.0.0           OPTION OFF
XDB                            Oracle XML Database                      21.0.0.0.0           VALID

SQL> select count(*) from dba_objects where status='INVALID';

  COUNT(*)
----------
         0

SQL>
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ WRITE NO
SQL>
SQL> alter session set container=cdb$root;

Session altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ WRITE NO
SQL>
SQL> alter pluggable database PDB$SEED close immediate;

Pluggable database altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       MOUNTED
SQL> alter pluggable database
  2  PDB$SEED open read only;

Pluggable database altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2147480144 bytes
Fixed Size                  9687632 bytes
Variable Size            1358954496 bytes
Database Buffers          771751936 bytes
Redo Buffers                7086080 bytes
Database mounted.
Database opened.
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
SQL>
SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata/data/SRCDB21C/datafile/o1_mf_system_jkkrzyh5_.dbf
/oradata/data/SRCDB21C/C9970CE544A53570E0536838A8C0BD95/datafile/o1_mf_system_jkks0147_.dbf
/oradata/data/SRCDB21C/datafile/o1_mf_sysaux_jkks0kt5_.dbf
/oradata/data/SRCDB21C/C9970CE544A53570E0536838A8C0BD95/datafile/o1_mf_sysaux_jkks0mfc_.dbf
/oradata/data/SRCDB21C/datafile/o1_mf_undotbs1_jkks0rx7_.dbf
/oradata/data/SRCDB21C/datafile/o1_mf_users_jkks0tks_.dbf
/oradata/data/SRCDB21C/C9970CE544A53570E0536838A8C0BD95/datafile/o1_mf_users_jkks0vsl_.dbf
/oradata/data/SRCDB21C/C9970CE544A53570E0536838A8C0BD95/datafile/o1_mf_usertbs_jkks0x2q_.dbf

8 rows selected.

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata/data/control01.ctl

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata/data/SRCDB21C/onlinelog/o1_mf_1_jkkrzsgd_.log
/oradata/data/SRCDB21C/onlinelog/o1_mf_2_jkkrzsq1_.log
/oradata/data/SRCDB21C/onlinelog/o1_mf_3_jkkrzt3m_.log

SQL>
SQL> CREATE PLUGGABLE DATABASE SRCDB21CPLUG ADMIN USER pdb_adm IDENTIFIED BY Password1;

Pluggable database created.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 SRCDB21CPLUG                   MOUNTED
SQL>
SQL> alter pluggable database SRCDB21CPLUG open read write;

Pluggable database altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 SRCDB21CPLUG                   READ WRITE NO
SQL> alter pluggable database SRCDB21CPLUG save state;

Pluggable database altered.

SQL> alter session set container=SRCDB21CPLUG;

Session altered.

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata/data/SRCDB21C/datafile/o1_mf_undotbs1_jkks0rx7_.dbf
/oradata/data/SRCDB21C/C999A29EBC237484E0536838A8C0EB50/datafile/o1_mf_system_jkl3twr0_.dbf
/oradata/data/SRCDB21C/C999A29EBC237484E0536838A8C0EB50/datafile/o1_mf_sysaux_jkl3twrr_.dbf
/oradata/data/SRCDB21C/C999A29EBC237484E0536838A8C0EB50/datafile/o1_mf_users_jkl3twrx_.dbf
/oradata/data/SRCDB21C/C999A29EBC237484E0536838A8C0EB50/datafile/o1_mf_usertbs_jkl3tws0_.dbf

SQL> select count(*) from dba_objects where status='INVALID';

  COUNT(*)
----------
         0

SQL> select comp_id,comp_name,version,status from dba_registry;

COMP_ID                        COMP_NAME                                VERSION              STATUS
------------------------------ ---------------------------------------- -------------------- --------------------------------------------
CATALOG                        Oracle Database Catalog Views            21.0.0.0.0           VALID
CATPROC                        Oracle Database Packages and Types       21.0.0.0.0           VALID
RAC                            Oracle Real Application Clusters         21.0.0.0.0           OPTION OFF
XDB                            Oracle XML Database                      21.0.0.0.0           VALID

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 SRCDB21CPLUG                   READ WRITE NO
SQL>
SQL> alter session set container=cdb$root;

Session altered.

SQL> sho pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 SRCDB21CPLUG                   READ WRITE NO
SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 2147480144 bytes
Fixed Size                  9687632 bytes
Variable Size            1358954496 bytes
Database Buffers          771751936 bytes
Redo Buffers                7086080 bytes
Database mounted.
Database opened.
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 SRCDB21CPLUG                   READ WRITE NO
SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production

SQL> exit
Disconnected from Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
[oracle@srlab21c dbs]$ sqlplus / as sysdba

SQL*Plus: Release 21.0.0.0.0 - Production on Sun Aug 15 18:31:50 2021
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.


Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0

SQL>





Root Issue Log:

[root@srlab21c softwares]# chmod -R 755 /u01/app/oracle/product/21.0.0.0/db_1
[root@srlab21c softwares]#
[root@srlab21c softwares]# chown -R oracle:oinstall /u01/app/oracle/product/21.0.0.0/db_1
[root@srlab21c softwares]# chmod 6550 $ORACLE_HOME/bin/oradism
chmod: cannot access ‘/bin/oradism’: No such file or directory
[root@srlab21c softwares]# cd /u01/app/oracle/product/21.0.0.0/db_1/bin
[root@srlab21c bin]# chmod 6550 oradism
[root@srlab21c bin]# ls -lrt oradism
-r-sr-s---. 1 oracle oinstall 1867552 Jul 28 00:20 oradism
[root@srlab21c bin]# chown root:dba oradism
[root@srlab21c bin]# ls -lrt oradism
-r-xr-x---. 1 root dba 1867552 Jul 28 00:20 oradism
[root@srlab21c bin]# chown root:oinstall oradism
[root@srlab21c bin]#
[root@srlab21c bin]# ls -lrt oradism
-r-xr-x---. 1 root oinstall 1867552 Jul 28 00:20 oradism
[root@srlab21c bin]# /u01/app/oracle/product/21.0.0.0/db_1/root.sh
Check /u01/app/oracle/product/21.0.0.0/db_1/install/root_srlab21c_2021-08-15_15-19-26-961560920.log for the output of root script
[root@srlab21c bin]#
[root@srlab21c bin]# ls -lrt oradism
-rwsr-x---. 1 root oinstall 1867552 Jul 28 00:20 oradism
[root@srlab21c bin]# ps -ef |grep tns
root        22     2  0 14:10 ?        00:00:00 [netns]
root     19910  2696  0 16:29 pts/0    00:00:00 grep --color=auto tns
[root@srlab21c bin]# ps -ef |grep pmon
oracle   14132     1  0 15:26 ?        00:00:00 ora_pmon_srcdb21c
root     19917  2696  0 16:29 pts/0    00:00:00 grep --color=auto pmon
[root@srlab21c bin]#
[root@srlab21c bin]#


Hope this helps!

Cheers!
Ramesh.









2 comments