Sorry, pdb1 was changed instead of pdb6.
This time, I opened the testdb database and tried doing the below steps again but getting same error.
SQL> startup open read only
ORACLE instance started.
Total System Global Area 2466248392 bytes
Fixed Size 8660680 bytes
Variable Size 603979776 bytes
Database Buffers 1845493760 bytes
Redo Buffers 8114176 bytes
Disconnected from Oracle Database 18c Enterprise Edition Release 220.127.116.11.0 - Production
[oracle@einoradbtest03 pdb1]$ export ORACLE_SID=cdb1
[oracle@einoradbtest03 pdb1]$ echo $ORACLE_SID
[oracle@einoradbtest03 pdb1]$ sqlplus / as sysdba
SQL*Plus: Release 18.104.22.168.0 - Production on Tue Feb 18 07:52:13 2020
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected to an idle instance.
SQL> CREATE PLUGGABLE DATABASE pdb1 USING '/u01/testdb.xml'
2 COPY FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/testdba/', '/u05/app/oracle/oradata/cdb1/pdb1/');
CREATE PLUGGABLE DATABASE pdb1 USING '/u01/testdb.xml'
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
Have you verified that the CDB is actually open? Try to execute:
export ORACLE_SID=cdb1 sqlplus / as sysdba SELECT open_mode FROM v$database;
Also, you could see in the alert log the status of the database.
The CDB must be open in order for you to create new PDBs or plug-in existing ones.
Finally, please consider upgrading to Oracle Database 19c. It is the release with long-term support. Patching ends in March 2023 but can be extended to March 2026. Oracle Database 18c will be out of support in June 2021.
You are correct. Without CDB, pdb cannot able to accommodate inside cdb. But on that link, it is not mentioned, that's why I also skipped.
I will create cdb and then try the same steps and acknowledge here.