Question

I am maintaining an SSIS package which extracts data from an Oracle 10g database. When the connection timed out with the error code:

Test connection failed because of an error in initializing provider. ORA-12170: TNS:Connect timeout occurred

I was told that I should change the sqlnet.ora or tnsnames.ora. This raises an interesting question. How can I find which ora file is being used by SSIS, other than changing them one by one until the problem goes away?

I should add that I have tnsnames.ora files in two directories that aren't named something like backup or _old

D:\oracle\product\11.2.0\client_1\NETWORK\ADMIN

D:\oracle\product\11.2.0\client_2_32_bit\NETWORK\ADMIN

Was it helpful?

Solution

Run tnsping.exe <address> the same way you're invoking SSIS (same environment settings, path, etc.). It will tell you where your files are located:

C:\>tnsping mydb.world

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 25-MAY-2011 11:06:14

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:
C:\oracle\Ora11gr2\product\11.2.0\client_x64\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = machinename.mycompany.com)(PORT = 1
521)) (LOAD_BALANCE = YES) (FAILOVER = YES) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = DEVRMED) (FAILOVER_MODE
= (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 180) (DELAY = 5))))
OK (140 msec)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top