Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ORA-12170: TNS:Connect timeout occurred

ORA-12170: TNS:Connect timeout occurred

From: <bartona_at_ohsu.edu>
Date: 17 Jan 2007 11:01:36 -0800
Message-ID: <1169060496.650806.127630@s34g2000cwa.googlegroups.com>


I have read all topics regarding to this error but not found any answer that would help: I have Oracle 10g (10.1) installed under Linux. I can connect just fine using sqlplus from the local machine and I can connect remotely with any application (e.g. sqldeveloper). However, when I try to connect to the database locally from a perl script, I get the ORA-12170 error message.

use DBI;

$ENV{"ORACLE_HOME"} = "/u01/app/oracle/OraHome_1";

$odsn="DBI:Oracle:xxx";
$ouid="yyy";
$opwd="zzz";

$odbh= DBI->connect ($odsn,$ouid,$opwd);

The necessary environmental variables are set:

ORACLE_SID=xxx
ORACLE_HOME=/u01/app/oracle/OraHome

The perl script obviously finds the instance xxx because if I change the instance name xxx to a different name, then I get a different error message (in that case TNS:could not resolve the connect identifier specified). So, DBI understands my xxx SID. The error is not caused by a busy network because I am connecting locally, and sqlplus is able to connect.

Does anybody have any suggestions?
Thank you.
Anke Received on Wed Jan 17 2007 - 13:01:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US