據我所知,Snowleopard的唯一可用安裝指南中,我在guide of Raimonds Simanovskis之後的Mac OSX Snowleopard上安裝了Oracle。在Mac OSX上的Oracle,從虛擬機訪問
只要我只在MacOX下使用Oracle自帶的MacOX,它運行良好,沒有問題。
現在我在Mac(Parallels Desktop 5)上有一個虛擬機,並且在此虛擬機中運行Windows XP。我想從Windows下的VM訪問在Mac OSX上運行的Oracle數據庫。從邏輯上講,它就像從另一臺計算機上訪問一樣。但總是當我試圖從XP訪問,例如用sqlplus
sqlplus iwes/[email protected]:1521/dbname
(使用「主機聯網只是」 192.168.3.2它的MacOS的地址,該地址是在其他應用程序運作良好。)
然後我得到的(Oracle和聽者都開始對Mac OSX和工作)的錯誤信息
ERROR:
ORA-12541: TNS: Kein Listener [German for: "no listener"]
什麼是我的Oracle安裝錯誤或丟失?
這裏是我的listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = dbname)
(ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
(GLOBAL_DBNAME = dbname)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
和我的tnsnames.ora
dbname =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dbname)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
賓果!就是這樣。更改主機名解決了問題。 (我仍然認爲這不合邏輯,因爲localhost和192.168.3.2是同一臺計算機,但這沒什麼我們需要討論的。) – Johanna
No localhost應始終爲127.0.0.1 – Phil