Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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
share|improve this question
1  
Can you try sqlplus hr/hr@OPTPROD –  Atilla Ozgur Mar 15 '12 at 7:46
    
@AtillaOzgur ORA-12154: TNS:could not resolve the connect identifier specified. –  kinkajou Mar 15 '12 at 8:21
    
try this sqlplus hr/hr@10.66.1.61:1521/OPTPROD –  Atilla Ozgur Mar 15 '12 at 9:22
    
@AtillaOzgur What does hr/hr does I am new to oracle please bear with me. –  kinkajou Mar 15 '12 at 10:26
    
ora-01015-invalid username/password login denied –  kinkajou Mar 15 '12 at 10:27
add comment

2 Answers

up vote 5 down vote accepted

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.

share|improve this answer
add comment

The tnsnames.ora file probably has a syntax problem since you can connect using easy connect. If you want to use tnsnames, I suggest modifying it or recreating it with Network Configuration Assistant. Full syntax can be found here.

share|improve this answer
    
I did the same. –  kinkajou Mar 16 '12 at 6:42
    
I assume you mean that you tried re-creating the tnsnames file with NCA and you still have a problem. What does TNSPing say for the connection? docs.oracle.com/cd/E11882_01/network.112/e10836/… –  Leigh Riffel Mar 16 '12 at 13:49
    
it has response –  kinkajou Mar 19 '12 at 3:18
    
Interesting. In that case either one of your assumptions is wrong or there is something more complex involved. If I were you I would re-verify everything and then open a SR with Oracle. –  Leigh Riffel Mar 19 '12 at 13:40
    
when I trace with wire shark it says redirection to another IP –  kinkajou Mar 20 '12 at 3:52
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.