[20160512]tnsnames.ora配置檔案.txt

lfree發表於2016-05-11

[20160512]tnsnames.ora配置檔案.txt

--今天再次解決1個tnsnames.ora配置檔案.看來這個檔案最好不要手工修改!!
--透過例子來說明:

78 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.78)(PORT = 1521))
    )
    (SDU = 32768)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = book)
  )
)

-- 注意別名前有一個空格:

d:\tools>sqlplus scott/book@78
sqlplus scott/book@78
SQL*Plus: Release 12.1.0.1.0 Production on Wed May 11 11:16:54 2016
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
ERROR:
ORA-12543: TNS:destination host unreachable

--而且出現這種情況,使用Net Manager是無法開啟tnsnames.ora配置檔案.
--更正後正常.另外參考連線:
http://blog.itpub.net/267265/viewspace-762224/


78 =
(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.78)(PORT = 1521))
    )
    (SDU = 32768)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = book)
  )
)

--如果(DESCRIPTION =前沒有空格,使用Net Manager是無法開啟tnsnames.ora配置檔案.但是使用它登入正常.再次做一個記錄.
--總之不建議使用編輯器手工改這個檔案.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2097683/,如需轉載,請註明出處,否則將追究法律責任。

相關文章