TNSNAMES和LISTENER文件的差异

时间:2016-01-19 00:15:15

标签: listener oracle12c tnsnames

我已经在两个不同的azure虚拟机上安装了Oracle,在安装之间,oracle 12C的版本已经将SE1更改为SE2,尽管根据我的知识设置了两台机器,但TNSNAMES.ORA在环境之间有所不同< / p>

# tnsnames.ora Network Configuration File: D:\app\oracle\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

DB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = host-live.f10.internal.cloudapp.net)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = EMMA)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

在我认为以类似方式设置的测试服务器上,TNSNAMES.ORA文件如下:

# tnsnames.ora Network Configuration File: D:\app\oracle\product\12.1.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_EMMATEST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


DBTEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = host-test.f7.internal.cloudapp.net)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = EMMATEST)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

我不确定为什么测试服务器在TNSNAMES.ORA文件中有一个额外的侦听器。如果我进一步查看在每个环境中找到的LISTENER.ORA文件,它们如下:

LIVE:

# listener.ora Network Configuration File: D:\app\oracle\product\12.1.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_DB =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\app\oracle\product\12.1.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\app\oracle\product\12.1.0\dbhome_1\bin\oraclr12.dll")
    )
  )

DB =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = host-live.f10.internal.cloudapp.net)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

TEST:

# listener.ora Network Configuration File: D:\app\oracle\product\12.1.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

DBTEST =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = host-test.f7.cloudapp.net)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_DBTEST = D:\app\oracle\product\12.1.0\dbhome_1\log

我对甲骨文相对了解,如果有人能帮助我找到我在设置测试环境时出错的地方,我将非常感激。

0 个答案:

没有答案