1 Reply Latest reply: Dec 20, 2012 10:27 PM by 970402 RSS

    ERROR ORA-12162: TNS:net service name is incorrectly specified

    970402
      Hi,

      I have installed and configured 2 node Oracle RAC 11gR2 on HP-UX 11.31 IA OS without any errors. But now when i am tring to login to "sqlplus / as sysdba", getting "ERROR ORA-12162: TNS:net service name is incorrectly specified".

      bash-4.2$ srvctl config database -d oradb
      Database unique name: oradb
      Database name: oradb
      Oracle home: /var/RAC/oracle/ODB
      Oracle user: oracle
      Spfile: +ORADATA/oradb/spfileoradb.ora
      Domain:
      Start options: open
      Stop options: immediate
      Database role: PRIMARY
      Management policy: AUTOMATIC
      Server pools: oradb
      Database instances: oradb2,oradb1
      Disk Groups: ORADATA
      Services:
      Database is administrator managed


      bash-4.2$ ps -eaf | grep pmon
      grid 9066 1 0 10:43:15 ? 0:42 asm_pmon_+ASM1
      oracle 1536 28254 0 09:03:45 pts/2 0:00 grep pmon
      oracle 20721 1 0 12:43:54 ? 1:17 ora_pmon_oradb1


      bash-4.2$ srvctl status database -d oradb
      Instance oradb2 is running on node lclc148
      Instance oradb1 is running on node lclc150


      bash-4.2$ crs_stat -t
      Name Type Target State Host
      ------------------------------------------------------------
      ora.DATA.dg ora....up.type ONLINE ONLINE lclc148
      ora....ER.lsnr ora....er.type ONLINE ONLINE lclc148
      ora....N1.lsnr ora....er.type ONLINE ONLINE lclc148
      ora....N2.lsnr ora....er.type ONLINE ONLINE lclc150
      ora....N3.lsnr ora....er.type ONLINE ONLINE lclc150
      ora.ORADATA.dg ora....up.type ONLINE ONLINE lclc148
      ora.asm ora.asm.type ONLINE ONLINE lclc148
      ora.eons ora.eons.type ONLINE ONLINE lclc148
      ora.gsd ora.gsd.type OFFLINE OFFLINE
      ora....SM2.asm application ONLINE ONLINE lclc148
      ora....48.lsnr application ONLINE ONLINE lclc148
      ora....148.gsd application OFFLINE OFFLINE
      ora....148.ons application ONLINE ONLINE lclc148
      ora....148.vip ora....t1.type ONLINE ONLINE lclc148
      ora....SM1.asm application ONLINE ONLINE lclc150
      ora....50.lsnr application ONLINE ONLINE lclc150
      ora....150.gsd application OFFLINE OFFLINE
      ora....150.ons application ONLINE ONLINE lclc150
      ora....150.vip ora....t1.type ONLINE ONLINE lclc150
      ora....network ora....rk.type ONLINE ONLINE lclc148
      ora.oc4j ora.oc4j.type OFFLINE OFFLINE
      ora.ons ora.ons.type ONLINE ONLINE lclc148
      ora.oradb.db ora....se.type ONLINE ONLINE lclc150
      ora.scan1.vip ora....ip.type ONLINE ONLINE lclc148
      ora.scan2.vip ora....ip.type ONLINE ONLINE lclc150
      ora.scan3.vip ora....ip.type ONLINE ONLINE lclc150


      Also pasting Environment variables for both "grid" and "oracle" users on both the hosts;

      On LCLC148 (grid):

      bash-4.2$ cat .profile
      export LANG=C
      export EDITOR=vi
      export GRID_HOME=/var/RAC/11.2.0/grid
      export ORACLE_BASE=/var/RAC/grid
      export ORACLE_SID=+ASM2
      export PATH=$PATH:$GRID_HOME/bin


      On LCLC148 (oracle):

      bash-4.2$ cat .profile
      export ORACLE_HOME=/var/RAC/oracle/ODB
      export ORACLE_BASE=/var/RAC/oracle
      export GRID_HOME=/var/RAC/11.2.0/grid
      export PATH=$PATH:$ORACLE_HOME/bin


      On LCLC150 (grid):

      bash-4.2$ cat .profile
      export LANG=C
      export EDITOR=vi
      export GRID_HOME=/var/RAC/11.2.0/grid
      export ORACLE_BASE=/var/RAC/grid
      export ORACLE_SID=+ASM1
      export PATH=$PATH:$GRID_HOME/bin


      On LCLC148 (oracle):

      bash-4.2$ cat .profile
      export ORACLE_HOME=/var/RAC/oracle/ODB
      export ORACLE_BASE=/var/RAC/oracle
      export PATH=$PATH:$ORACLE_HOME/bin
      export GRID_HOME=/var/RAC/11.2.0/grid


      -Ashish