Issues Connecting to PDB

From: Scott Canaan <srcdco_at_rit.edu>
Date: Tue, 28 Jun 2022 17:24:53 +0000
Message-ID: <MWHPR16MB15500D032D2346879172C6CEC5B89_at_MWHPR16MB1550.namprd16.prod.outlook.com>



I am playing with containers to try to learn the nuances. I have a container database and one pdb. The particulars are:

Oracle version: 19.15
O/S: Red Hat 7
Container: dba2ctst
Pdb: dba2ptst

Both the container and pdb are open:

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DBA2PTST                       READ WRITE NO

I set the system password in both (I think), using the following command:

SQL> alter user system identified by xxxxxxxxxxxxxxx container=all;

User altered.

When I try to connect to the pdb, I get an ORA-01034:

SQL> conn system_at_dba2ptst
Enter password:
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: 4475
Additional information: -1748254857
Process ID: 0
Session ID: 0 Serial number: 0

Warning: You are no longer connected to ORACLE.

The alert log doesn't have any errors indicating what file might be missing.

I'm thinking the issue is really with the listener and tnsnames.ora file. The listener has the following entry:

   (SID_DESC =
(GLOBAL_DBNAME = dba2ctst.rit.edu)
(SID_NAME = DBA2CTST)
(ORACLE_HOME = /oracle/app/product/19.0.0.0)
    )
    (SID_DESC =

#      (GLOBAL_DBNAME = dba2ptst.rit.edu)

(SID_NAME = DBA2PTST)
(SERVICE_NAME = DBA2PTST)
(ORACLE_HOME = /oracle/app/product/19.0.0.0)
    )

The entries in the tnsnames.ora file are:

DBA2CTST =
  (DESCRIPTION =
    (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT =1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = DBA2CTST))   )

DBA2PTST =
  (DESCRIPTION =
    (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT =1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = DBA2PTST))   )

The lsnrctl status command returns:

Services Summary...
Service "DBA2PTST" has 1 instance(s).
  Instance "DBA2PTST", status UNKNOWN, has 1 handler(s) for this service... Service "dba2ctst.rit.edu" has 1 instance(s).   Instance "DBA2CTST", status UNKNOWN, has 1 handler(s) for this service...

I thought you were supposed to be able to connect directly to a pdb, as if it were a standalone database. I'm sure it is something simple, I just can't see it.

Thank you,

Scott Canaan '88
Sr Database Administrator
Information & Technology Services
Finance & Administration
Rochester Institute of Technology
o: (585) 475-7886 | f: (585) 475-7520
srcdco_at_rit.edu<mailto:srcdco_at_rit.edu> | c: (585) 339-8659

CONFIDENTIALITY NOTE: The information transmitted, including attachments, is intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and destroy any copies of this information.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jun 28 2022 - 19:24:53 CEST

Original text of this message