2014年2月14日 星期五

oracle 11g create db後,遇到「監聽器未啟動或資料庫服務未在監聽器註冊」的error !?

環境:
server 2012 (64bit)+11g 64
在create一個「TOC64」的db時,結果出現以下錯誤畫面:
第一次看到這樣的錯誤,真的會很不知所措

如何解決?
請打開Net Manager:
1. 看一下「服務命名」是否有沒有把db加入(如果沒有,那就真的無救了,正常是會有的)
2.切換到Listener,IP形態的位址要指定(日後外部連入會用的到)
3.重點來了!!,請切換到listener的「其他服務」

   請新增一個「服務」,指定其「程式名稱」、「SID」及「ORACLE本位目錄」

Oracle本位目錄不知道的話,直接copy第一個服務的那個欄位來用就可以了
設定完後,儲存網路組態,再去服務中把Oracle Listener 的服務重新啟動(其相對的「OracleService你的DB」也重啟服務吧)
 用toad在本機連看看吧
----後記--------------------------
事實上最快的方式是直到修改listener.ora  & tnsnames.ora,修改完後,用tns name(在toad中手動輸入)直接去連就可以了
---listener.ora--參考內容
# listener.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_2\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (PROGRAM = extproc)
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_2)
    )
    (SID_DESC =
      (PROGRAM = ttcs64)
      (SID_NAME = ttcs64)
      (ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_2)
    )

  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.11)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-A2HVFKEQJ1M)(PORT = 1521))
    )

  )

ADR_BASE_LISTENER = D:\app\Administrator
=========================================

------------tnsnames.ora參考內容-----------------
# tnsnames.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_2\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

TOC64 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-A2HVFKEQJ1M)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = TOC64)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

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


TTCS64 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = TTCS64)
    )
  )



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


ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
===============================================
以上,大家加油吧
  


沒有留言:

張貼留言