Re: Issues Connecting to PDB

From: Al B. <albert.y.balbekov_at_gmail.com>
Date: Tue, 28 Jun 2022 19:20:34 -0700
Message-ID: <CACKN2vEHcOL5-z0-+JG=x49gtg3DQDO_oDj3azD4GJJ4627HQw_at_mail.gmail.com>



Hi Scott,

Listener.ora does not need a separate entry for PDB, because there is no such thing as PDB instance. As soon as listener knows about container instance, the PDB inside that container should auto register with the listener as a service with the name equal to PDB name. Try to remove the PDB entry and see if it helps.

Good luck,
Albert Balbekov

On Tue, Jun 28, 2022 at 10:25 AM Scott Canaan <srcdco_at_rit.edu> wrote:

> 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 <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 Wed Jun 29 2022 - 04:20:34 CEST

Original text of this message