HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Using Oracle client to connect to remote database

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
connectdatabaseclientusingremoteoracle

Problem

Although I can do a telnet to remote oracle port I am unable to connect.
I have a following tnsname.ora connecting to oracle database using sql plus:

remoteOracle =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.66.1.61)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PROD)
    )
  )


My 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)


When I try to connect using this I always get following error

ORA-12504: TNS listener was not given service_name in connect data.


And toad shows following error:

ORA-12170 TNS connection Time out

Solution

There are different ways to connect oracle. One of them is easy connect .

You may use

sqlplus username/password@server/SID


According to comments. You can connect oracle using easy connect but hr (human resources) account does not exists.
Therefore try to use

sqlplus username/password@10.66.1.61:1521/OPTPROD


You should be able to connect your oracle system.

Code Snippets

sqlplus username/password@server/SID
sqlplus username/password@10.66.1.61:1521/OPTPROD

Context

StackExchange Database Administrators Q#15040, answer score: 7

Revisions (0)

No revisions yet.