plsql设置连接本地或者远程的oracle数据库

1.进入app\xx\product\11.2.0\dbhome_1\NETWORK\ADMIN中tnsnames.ora添加远程数据库实例

# tnsnames.ora Network Configuration File: D:\app\helimin\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 =本地.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )


ORCL_TY=
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 11.12.13.14)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL_TY)
    )
  )

2.进入plsql(不用输入账号密码时进入),进行如下设置

plsql设置连接本地或者远程的oracle数据库_第1张图片

重新打开plsql输入账号密码即可登入

你可能感兴趣的:(oracle)