6 Replies Latest reply: Aug 23, 2013 5:13 PM by Javier Francisco Ruiz RSS

    ORA-27101: shared memory realm does not exist while connecting to pdb

    jeffhan

      i've install oracle 12c on Redhat 6. The creation of CDB and PDB was all successful.

      SQL> select name, open_mode from v$pdbs;

       

       

      NAME                           OPEN_MODE

      ------------------------------ ----------

      PDB$SEED                       READ ONLY

      CMS121P1                       READ WRITE

      FUN121P1                       READ WRITE

       

      SQL> select name,con_id from v$active_services;

       

       

      NAME                                                                 CON_ID

      ---------------------------------------------------------------- ----------

      fun121p1                                                                  4

      cms121p1                                                                  3

      o121cdbXDB                                                                1

      o121cdb                                                                   1

      SYS$BACKGROUND                                                            1

      SYS$USERS                                                                 1

       

       

      6 rows selected.

       

      i created myself an user by altering the container and username (jehan)

       

       

      Now the weird things happened:

      1. the CDB or PDB didn't get registered on listener. even i ran

      "exec dbms_service.start_service('cms121p1');

      i had to manually add the entries for all CDB and PDBs.

       

      2. i can't connect to any of PDB from sqlplus, even they are open&online

      bash-4.1$ sqlplus jehan/passwd@localhost:1521/fun121p1

       

       

      SQL*Plus: Release 12.1.0.1.0 Production on Thu Aug 22 11:23:28 2013

       

       

      Copyright (c) 1982, 2013, Oracle.  All rights reserved.

       

       

      ERROR:

      ORA-01034: ORACLE not available

      ORA-27101: shared memory realm does not exist

      Linux-x86_64 Error: 2: No such file or directory

      Process ID: 0

      Session ID: 0 Serial number: 0

       

       

      i used DBCA to wipe off the whole database (CDB&PDB) and recreate them again. still the same results. Anybody runs to the same issue as mine?

       

      Thanks!

        • 1. Re: ORA-27101: shared memory realm does not exist while connecting to pdb
          user11273064

          Hi

           

          It appears that the listener is not really identifying the database, because none of the CDB or PDB services got registered.

          Can you provide some more details as below :

           

          - Output of "lsnrctl services"

          - listener.ora

          - tnsnames.ora

          - alert log

          - relevant part of the listener.log showing error messages etc

           

          Please check that either the listener is running on the default port 1521, or the "local_listener" parameter is specified in the init.ora. Also, check if "alter system register" helps in registering the services.

           

          Thanks,

          Sanket

          • 2. Re: ORA-27101: shared memory realm does not exist while connecting to pdb
            jeffhan

            i did the installation once again. Still the same issue.

            This time i named CDB as : o121cdb

            PDB as: cms121p1

             

            Both are online and operational. same issue for listener and connections.

             

            - output of "lsnrctl services"

            bash-4.1$ lsnrctl service

             

             

            LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 23-AUG-2013 11:50:39

             

             

            Copyright (c) 1991, 2013, Oracle.  All rights reserved.

             

             

            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

            The listener supports no services

            The command completed successfully

             

            -listener.ora (auto generate by installation)

            LISTENER =

              (DESCRIPTION_LIST =

                (DESCRIPTION =

                  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

                  (ADDRESS = (PROTOCOL = TCP)(HOST = vantgvmoradb01.pgdev.sap.corp)(PORT = 1521))

                )

              )

             

            -tnsnames.ora

            bash-4.1$ cat tnsnames.ora

            # tnsnames.ora Network Configuration File: /databases/oracle/12cR1/network/admin/tnsnames.ora

            # Generated by Oracle configuration tools.

             

             

            O121CDB =

              (DESCRIPTION =

                (ADDRESS = (PROTOCOL = TCP)(HOST = vantgvmoradb01.pgdev.sap.corp)(PORT = 1521))

                (CONNECT_DATA =

                  (SERVER = DEDICATED)

                  (SERVICE_NAME = o121cdb)

                )

              )

             

            --alert.log

            nothing wrong in the whole log file.

             

            --listener.log

            no listener.log generated (i will turn the trace on to see what happen)

             

            --alter system register

            doesn't help at all.

             

            Thanks!

            • 3. Re: ORA-27101: shared memory realm does not exist while connecting to pdb
              Javier Francisco Ruiz

              You have no services register to the listener follow these steps.

               

              First check which how the listener is running from by issuing

              $ps -ef |grep tns

               

              Then log into you CDB$ROOT database and check the active services

              $sqlplus / as sysdba

              SQL>col name format a20

              SQL>col network_name format a20

              SQL>select con_id,con_name,name,network_name from v$active_services order by con_id asc;

               

              The above active services should be register to the listener that is in the local_listener parameter

               

              Then check the parameter for local_listener

              SQL>show parameter local_listener

               

              Make sure the local_listener is valid

               

              You can check out my blog below where I have several entries for Multitenant Configuration

              Oracle Database 12c

              • 4. Re: ORA-27101: shared memory realm does not exist while connecting to pdb
                jeffhan

                listener is running:

                bash-4.1$ ps -ef |grep tns

                root        25     2  0 Aug22 ?        00:00:00 [netns]

                oracle    5496     1  0 Aug22 ?        00:00:00 /databases/oracle/12cR1/bin/tnslsnr LISTENER -inherit

                oracle   16776  2332  0 14:14 pts/0    00:00:00 grep tns

                 

                 

                SQL> select con_id,con_name,name,network_name from v$active_services order by con_id asc;

                    CON_ID CON_NAME                       NAME                 NETWORK_NAME

                ---------- ------------------------------ -------------------- --------------------

                         1 CDB$ROOT                       o121cdb              o121cdb

                         1 CDB$ROOT                       o121cdbXDB           o121cdbXDB

                         1 CDB$ROOT                       SYS$USERS

                         1 CDB$ROOT                       SYS$BACKGROUND

                         3 CMS121P1                       cms121p1             cms121p1

                 

                SQL> show parameter listener

                 

                 

                NAME                                 TYPE        VALUE

                ------------------------------------ ----------- ------------------------------

                listener_networks                 string

                local_listener                       string

                remote_listener                    string

                 

                Looks like my listener is not registering any of db service. Even alter system register didn't help.

                • 5. Re: ORA-27101: shared memory realm does not exist while connecting to pdb
                  jeffhan

                  oh my god!

                  After i enable the tracing for listener. i found it's complaining about "rejecting the registration from 127.0.0.1"

                  that reminds me to check /etc/hosts file

                  i found there are multi-entries for the same hostname like this:

                  127.0.0.1 testhost.dev testhost

                  10.126.1.36 testhost.dev testhost

                   

                  After removed that 127.0.0.1 line, Vooola!!! everything works now!

                   

                  Thanks for your options. Javie your blog is great, i am following now.

                  • 6. Re: ORA-27101: shared memory realm does not exist while connecting to pdb
                    Javier Francisco Ruiz

                    That is good you could also set the local_listener parameter if needed.

                     

                    Thanks for the comment on my blog.