ora-12169 tns net service name given as connect identifier is too long

wisdomone1發表於2010-06-17
啟用監聽器動態註冊後,根據$ORACLE_HOME/network/admin/samples目錄,有tnsnames.ora配置示例,執行:
  sqlplus as sysdba報如題錯誤
 
 
檢視此檔案的相關說明及使用後,修正如下:
 
-bash-3.2$ pwd
/oracle/product/10.2.0/db_1/network/admin
-bash-3.2$ more tnsnames.ora
# This file contains the syntax information for
# the entries to be put in any tnsnames.ora file
# The entries in this file are need based.
# There are no defaults for entries in this file
# that Sqlnet/Net3 use that need to be overridden
#
# Typically you could have two tnsnames.ora files
# in the system, one that is set for the entire system
# and is called the system tnsnames.ora file, and a
# second file that is used by each user locally so that
# he can override the definitions dictated by the system
# tnsnames.ora file.
# The entries in tnsnames.ora are an alternative to using
# the names server with the onames adapter.
# They are a collection of aliases for the addresses that
# the listener(s) is(are) listening for a database or
# several databases.
# The following is the general syntax for any entry in
# a tnsnames.ora file. There could be several such entries
# tailored to the user's needs.
orcl=              #如果有多個description,這兒本身有個description_list節,因為我們只 邊一個主機上面的資料庫,所有不用 description_list
                                # one or more descriptions
                                # If there is just one description, unnecessary ]
          (DESCRIPTION=
                                # Can take values between 512 and 32K
                                # one or more addresses
                                # If there is just one address, unnecessary ]
 
                                  #同上,本身也有一個address list節,如有多個address的話
              (ADDRESS= 
                (PROTOCOL=tcp)
                (HOST=192.168.19.155)
                (PORT=1521)
              )
 
 
                   #連線到哪個資料庫(sid及global_name)
             (CONNECT_DATA=
                (SID=orcl)
                (GLOBAL_NAME=orcl)
              )
          )
-bash-3.2$

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

相關文章