Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to connect to PDB in Oracle 12c

user2635268Apr 7 2016 — edited May 3 2016

Okay, I initially had other problem which eventually lead me to this. You can get the overview of it here:

Now, I have another problem, how can I now connect to the PDB database named PDBORCL as mentioned in the guide: https://oracle-base.com/articles/12c/multitenant-connecting-to-cdb-and-pdb-12cr1

I have already changed the content of my tnsnames.ora to

  1. # tnsnames.ora Network Configuration File: /bkofa/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora 
  2. # Generated by Oracle configuration tools. 
  3. ORCL12 = 
  4.   (DESCRIPTION = 
  5.     (ADDRESS = (PROTOCOL = TCP)(HOST = afxortsts)(PORT = 1523)) 
  6.     (CONNECT_DATA = 
  7.       (SERVER = DEDICATED) 
  8.       (SERVICE_NAME = orcl12) 
  9.     ) 
  10.   ) 
  11. PBDORCL = 
  12.   (DESCRIPTION = 
  13.     (ADDRESS = (PROTOCOL = TCP)(HOST = afxortsts)(PORT = 1523)) 
  14.     (CONNECT_DATA = 
  15.       (SERVER = DEDICATED) 
  16.       (SERVICE_NAME = pdborcl) 
  17.     ) 
  18.   ) 

but that didn't work. I also tried to change the listener.ora file as:

  1. # listener.ora Network Configuration File: /bkofa/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora 
  2. # Generated by Oracle configuration tools. 
  3. LISTENER = 
  4.   (DESCRIPTION_LIST = 
  5.     (DESCRIPTION = 
  6.       (ADDRESS = (PROTOCOL = TCP)(HOST = afxortsts)(PORT = 1523)) 
  7.       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) 
  8.     ) 
  9.   ) 
  10. SID_LIST_LISTENER = 
  11.   (SID_LIST = 
  12.     (SID_DESC = 
  13.       (GLOBAL_DBNAME = pdborcl) 
  14.       (SID_NAME = pdborcl) 
  15.     ) 
  16.   ) 

But then I encounter:

  1. ORA-01034: ORACLE not available 
  2. ORA-27101: Shared memory realm does not exist 
  3. SVR4 Error: no such file or directory 
  4. Additional information: 2581 

By the way, this is is number of containers on my DB so far:

  1. SELECT name, pdb 
  2. FROM   v$services 
  3. ORDER BY name
  4. NAME              PDB 
  5. SYS$BACKGROUND    CDB$ROOT 
  6. SYS$USERS         CDB$ROOT 
  7. orcl12            CDB$ROOT 
  8. orcl12XDB         CDB$ROOT 
  9. pdborcl           PDBORCL 
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2016
Added on Apr 7 2016
36 comments
28,702 views