Oracle-11g

Oracle 11G 無法從模板創建數據庫

  • February 9, 2013

我正在嘗試從 Oracle 11G 中的現有模板創建一個新數據庫。我在使用 dbca 之前已經這樣做了並且沒有遇到問題,但是現在我遇到了以下錯誤:

TNS-04404: no error caused by oracle.net.ConfigException: 
TNS-04414: File error caused by: 
TNS-04610: No literals left, reached end of NV pair

經過一番研究,我發現 TNS-04610 可能是 tnsnames.ora 文件的問題。我在 $ORACLE_HOME/network/admin/ 目錄中找到了這個文件。這些文件包含以下內容:

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_3/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.




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

ORCL =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

   )
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = orcl.domain.com)
   )
 )

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

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

據我所知,該文件看起來是正確的。是否有我不知道的語法錯誤?

這個文件不是我創建的,據我所知,它沒有被任何人手動編輯過。

感謝任何線索,因為我找不到任何東西。

最後兩個條目有不平衡的括號。您沒有關閉頂級括號。

TEST =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
   )
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = Test)
   )
 )              -- add this
med =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
   )
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = med)
   )
 )              -- add this

(儘管不要添加評論。)

與任何地方的外殼保持一致可能是一個好主意(即使我不確定它是否真的重要)。如果您呼叫您的數據庫TEST,請放在TEST任何地方,而不是Test在某些地方和TEST其他地方。

引用自:https://dba.stackexchange.com/questions/34445