make tnsnames.ora:
ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb)
)
)
make listener.ora:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\app\oracle
Then restart Listener:
lsnrctl stop
lsnrctl start
Then change the state of the pluggable databases:
sqlplus / as sysdba
/* check the sate: */
SQL> select con_id,name,open_mode from v$pdbs;
/* opens the pluggable database named ORCLPDB */
SQL> alter pluggable database ORCLPDB open;
/* sets the current session's container context to the ORCLPDB pluggable database */
SQL> alter session set container=ORCLPDB;
SQL> commit;
/* check the connected container: */
SQL> show con_name;
/* check the pdb name: */
SQL> select pdb_name from cdb_pdbs;
/* connect to the pdb: */
SQL> alter session set container = ORCLPDB;
/* to keep it starts with the windows server startup, you need to save the PDB’s state: */
SQL> alter pluggable database orclpdb save state;
edit the create_databases.bat, eg:
set SPOTFIREDB_ROOTFOLDER=C:\app\oracle\oradata\ORCL\orclpdb
set DBSERVER_CONNECTIDENTIFIER=//[yourDBIP]/ORCLPDB