使用Oracle客户端连接远程数据库

kin*_*jou 4 oracle oracle-11g-r2

虽然我可以对远程 oracle 端口执行 telnet,但我无法连接。我有以下tnsname.ora使用 sql plus 连接到 oracle 数据库:

remoteOracle =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.66.1.61)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PROD)
    )
  )
Run Code Online (Sandbox Code Playgroud)

我的sqlnet.ora

# sqlnet.ora Network Configuration File: C:\ORACLE\product\11.2.0\client_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Run Code Online (Sandbox Code Playgroud)

当我尝试使用此连接时,我总是收到以下错误

ORA-12504: TNS listener was not given service_name in connect data.
Run Code Online (Sandbox Code Playgroud)

蟾蜍显示以下错误:

ORA-12170 TNS connection Time out
Run Code Online (Sandbox Code Playgroud)

Ati*_*gur 7

连接oracle有多种方式。其中之一是轻松连接

您可以使用

sqlplus username/password@server/SID
Run Code Online (Sandbox Code Playgroud)

根据评论。您可以使用 easy connect 连接 oracle,但 hr(人力资源)帐户不存在。因此尝试使用

sqlplus username/password@10.66.1.61:1521/OPTPROD 
Run Code Online (Sandbox Code Playgroud)

您应该能够连接您的 oracle 系统。