3 Replies Latest reply: Oct 16, 2013 9:01 AM by Srini Chavali-Oracle RSS

    After database installation and computer rebooting TNS-12505 happens

    969134

      I have installed Oracle.

      After install I have execute two scripts:

      /opt/oraInventory/orainstRoot.sh

      $ORACLE_HOME/root.sh

      It creates some files in:

       

      ls /usr/local/bin

      coraenv  dbhome  oraenv

       

      After this database worked normally.

      SQLDeveloper could connect to Oracle.

      But after reboot nothing works.

      I have execute $ORACLE_HOME/dbstart but it not works.

      After this I manually starts a database:

       

      $ORACLE_HOME/sqlplus /nolog

      connect / as sysdba

      startup

       

      Startup is failed - no initORCL.ora.

      I have copied init.ora and edit it like this:

       

      db_name='ORCL'

      memory_target=1G

      processes = 150

      audit_file_dest='/opt/oracle/admin/orcl/adump'

      audit_trail ='db'

      db_block_size=8192

      db_domain=''

      db_recovery_file_dest='/opt/oracle/flash_recovery_area'

      db_recovery_file_dest_size=2G

      diagnostic_dest='/opt/oracle'

      dispatchers='(PROTOCOL=TCP) (SERVICE=ORCL)'

      open_cursors=300

      remote_login_passwordfile='EXCLUSIVE'

      undo_tablespace='UNDOTBS1'

      # You may want to ensure that control files are created on separate physical

      # devices

      #control_files = (ora_control1, ora_control2)

      control_files = (/opt/oracle/oradata/orcl/control01.ctl, /opt/oracle/flash_recovery_area/orcl/control02.ctl)

      compatible ='11.2.0'

       

      After this manipulations database starts.

       

      connect / as sysdba

      Connected to an idle instance.

      SQL> startup                                

      ORACLE instance started.

       

      Total System Global Area 1068937216 bytes

      Fixed Size            2220200 bytes

      Variable Size          616566616 bytes

      Database Buffers      444596224 bytes

      Redo Buffers            5554176 bytes

      Database mounted.

      Database opened.

       

       

      But SQLDeveloper cannot connect to it.

      It failed with:

      TNS-12505: TNS:listener does not currently know of SID given in connect descriptor

      I am looking in listener.ora and tnsnames.ora, but it looks fine:

      listener.ora:

       

      LISTENER =

       

        (DESCRIPTION_LIST =

       

          (DESCRIPTION =

       

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

       

            (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

       

          )

       

        )

       

      tnsnames.ora:

       

      LISTENER_ORCL =

       

        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

       

      ORCL =

       

        (DESCRIPTION =

       

          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

       

          (CONNECT_DATA =

       

            (SERVER = DEDICATED)

       

            (SERVICE_NAME = orcl)

       

          )

       

        )

       

      ADR_BASE_LISTENER = /opt/oracle

       

      I cannot understand what problem in???

       

       

      ./lsnrctl status

       

      LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-OCT-2013 14:42:26

       

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

       

      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))

      STATUS of the LISTENER

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

      Alias                     LISTENER

      Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

      Start Date                16-OCT-2013 12:44:37

      Uptime                    0 days 1 hr. 57 min. 49 sec

      Trace Level               off

      Security                  ON: Local OS Authentication

      SNMP                      OFF

      Listener Parameter File   /opt/oracle/product/11.2.0/network/admin/listener.ora

      Listener Log File         /opt/oracle/diag/tnslsnr/ComputerName/listener/alert/log.xml

      Listening Endpoints Summary...

        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

      The listener supports no services

      The command completed successfully

       

       

      ./lsnrctl status tells than there is no services associated with listener.

      What I need to do?