Oracle 11g ORA-12514:TNS:監聽程序當前沒法識別鏈接描述符中請求的服務

建立數據庫test數據庫

1.打開Oracle net manager服務器

2.服務命名:test網絡

tcpip 主機:127.0.0.1 端口:1521app

3.監聽程序tcp

選擇 監聽位置spa

網絡地址:localhostcode

端口:1521blog

選擇 數據庫服務ip

全局數據庫名 SID: testcmd

4.中止監聽服務 啓動監聽服務

# listener.ora Network Configuration File: E:\app\Administrator\product\11.1.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = test)
      (SID_NAME = test)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = NBS)
      (SID_NAME = NBS)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  )

2個數據庫服務一個test,一個NBS,公用一個監聽

# tnsnames.ora Network Configuration File: E:\app\Administrator\product\11.1.0\db_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

test=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = test)
    )
  )

NBS =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = NBS)
    )
  )

客戶端沒法訪問服務器 Oracle 出現12541錯誤

C:\Windows\System32\drivers\etc

修改hosts

10.50.180.123 andyzc

服務器ip 主機名

 

而後在listener.ora將localhost改成andyzc

cmd-》tsnping andyzc

出現ok就能夠用客戶端鏈接到服務器了

相關文章
相關標籤/搜索