0

I am able to connect to Oracle DB using Toad with Datasource name and username/password. Oracle client 12 as Oracle driver. oracle database path is set properly in the environment variables. sqlnet.ora, listener.ora and tnsnames.ora is present in ORACLE\ORANT\NETWORK\ADMIN folder and configured properly. I tried to query using Sqlplus in cmd prompt using following command:

 connect User/pass@dw-prod.server.int:1527/pdw1s_servicename

I am getting ORA-12170: TNS Connect timeout error. Please help.

Arvinth
  • 60
  • 6
  • 27
  • We can't see how your data source is configured, but the error suggests you're using a different hostname or port number; or possibly that you're using two different (real or virtual) machines with network differences. (Your SQL\*Plus connection, at least, isn't using a TNS alias so tnsnames.ora etc. isn't really relevant.) – Alex Poole Aug 02 '19 at 08:39
  • If you have properly configured the tnsnames.ora file on your machine then you can use the command: `connect user/password@tns_alias`. Also before that check, if you are able to connect using tns_alias by executing the command: `tnsping ` – Popeye Aug 02 '19 at 08:54
  • Now i am able to connect to database using ezconnect. Now how to use this information for Oracle ODBC driver configuration to create a connection string. Because TNS is not working properly in my system – Arvinth Aug 02 '19 at 13:34

2 Answers2

1

In SQL*Plus, just need to connect using the TNS alias.

connect user/password@tns_alias

  • Now i am able to connect to database using ezconnect. Now how to use this information for Oracle ODBC driver configuration to create a connection string. Because TNS is not working properly in my system – Arvinth Aug 02 '19 at 13:34
0

If your password contains specific characters like @ or ! probably you are getting the error for this

Zac
  • 984
  • 14
  • 25
Emrah
  • 29
  • 1
  • 6