Re: [External] : Issues Connecting to PDB

From: Gerald Venzl <gerald.venzl_at_oracle.com>
Date: Tue, 28 Jun 2022 22:33:35 +0000
Message-ID: <20C5BBD5-F188-410A-BD74-25CB89CF3F5F_at_oracle.com>



Hi Scott,

It appears that when connecting to _at_dba2ptst you end up connecting to an Oracle Database instance that isn’t currently running. What does “tnsping dba2ptst” give you?

At a first glance, I notice that DBA2PTST is listed as a SID (i.e. Oracle instance name) in the listener.ora:

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

#      (GLOBAL_DBNAME = dba2ptst.rit.edu<http://dba2ptst.rit.edu/>)

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

Are you sure this shouldn’t be DBA2CTST like the one above?

Thx,


Gerald Venzl | Senior Director | Product Management Email: gerald.venzl_at_oracle.com<mailto:gerald.venzl_at_oracle.com> Oracle ST & Database Development
400 Oracle Parkway | Redwood Shores | 94065 | USA

On Jun 28, 2022, at 10:24, Scott Canaan <srcdco_at_rit.edu<mailto: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<
http://dba2ctst.rit.edu/>)
(SID_NAME = DBA2CTST)
(ORACLE_HOME = /oracle/app/product/19.0.0.0)
    )
    (SID_DESC =

#      (GLOBAL_DBNAME = dba2ptst.rit.edu<http://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<http://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 Wed Jun 29 2022 - 00:33:35 CEST

Original text of this message