[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to change default listener service_name on oracle 10g database



 
    
how to change default listener service_name on oracle 10g database
------------------------------------------------------------------

[oradb@eclectic admin]$ hostname 
eclectic.its.unimacq.edu.au

[oradb@eclectic admin]$ pwd
/oracle/10g/db/network/admin

[oradb@eclectic admin]$ cat listener.ora.orig 
# listener.ora Network Configuration File: /oracle/10g/db/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /oracle/10g/db)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = eclectic.its.unimacq.edu.au)(PORT = 1521))
      )
    )
  )


Default service_name (or db name) during the installation is "db". So you can't connect it by using:

% sqlplus "sys/change_your_name@xxxxxxxxxxxxxxxxxxxxxxxxxxx as sysdba"

command. The solution is add:

    (SID_DESC =
      (GLOBAL_DBNAME = eclectic.its.unimacq.edu.au)
      (ORACLE_HOME = /oracle/10g/db)
      (SID_NAME = db)
    )

into listener.ora file. Restart listener. New listener.ora file looks like:

[oradb@eclectic admin]$ cat listener.ora
# listener.ora Network Configuration File: /oracle/10g/db/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /oracle/10g/db)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = eclectic.its.unimacq.edu.au)
      (ORACLE_HOME = /oracle/10g/db)
      (SID_NAME = db)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = eclectic.its.unimacq.edu.au)(PORT = 1521))
    )
  )


Google