tnsnames.ora 文件位置

E:\app\Pactera\product\11.2.0\dbhome_1\NETWORK\ADMIN

tnsnames.ora文件

# tnsnames.ora Network Configuration File: E:\app\Pactera\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

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

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-DT66HE1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

使用editplus或者记事本或其他工具打开tnsnames.ora,进行编辑

配置一下文件

 CONN_shenyi2 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.144.191)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )
上边的SERVICE_NAME 和HOST、PORT 改为自己的即可

 

你可能感兴趣的:(oracle)