PL/SQL Developer使用預先配置資料庫報錯 ORA-12154:tns:could not resolve the connect identifier specified,

情況描述:我Orcle客戶端使用的是instantclient_12_2,根路徑為x:\Program Files\instantclient_12_2,安裝后沒有tnsnames.ora檔案 ,這個檔案的路徑從網上查詢得知是:根路徑+\network\admin\tnsnames.ora,
于是在根目錄下建兩級檔案夾,然后用notpad建了tnsnames.ora,把搜到的檔案內容粘貼進去,(這一步是個坑)
結果登錄報錯,ORA-12154:tns:could not resolve the connect identifier specified,網上有說環境變數PATH不對的,還有說TNS_ADMIN沒有配置的,試過之后都不行,
最后解決辦法:從同事那要來tnsnames.ora檔案替換自己建的檔案,改成自己用的資料庫鏈接,神奇的可以用了,
估計是空格或格式問題,時間有限不探究那么多了,記錄下來警示指導后來人,
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/36959.html
標籤:Oracle
下一篇:linux安裝資料時報錯Could not execute auto check for display colors using command /usr/bin/xdpyinfo.
