我如何知道我的 SSIS 包使用哪个 ORA 文件连接到 Oracle 10g?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6126548/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I know which ORA file my SSIS package is using to connect to Oracle 10g?
提问by Blanthor
I am maintaining an SSIS package which extracts data from an Oracle 10g database. When the connection timed out with the error code:
我正在维护一个从 Oracle 10g 数据库中提取数据的 SSIS 包。当连接超时并显示错误代码时:
Test connection failed because of an error in initializing provider. ORA-12170: TNS:Connect timeout occurred
由于初始化提供程序时出错,测试连接失败。ORA-12170: TNS:Connect 超时发生
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?
有人告诉我应该更改 sqlnet.ora 或 tnsnames.ora。这就提出了一个有趣的问题。除了一一更改直到问题消失,我如何才能找到 SSIS 正在使用的 ora 文件?
I should add that I have tnsnames.ora files in two directories that aren't named something like backup or _old
我应该补充一点,我在两个目录中有 tnsnames.ora 文件,这些文件没有命名为备份或 _old
D:\oracle\product\11.2.0\client_1\NETWORK\ADMIN
D:\oracle\product\11.2.0\client_2_32_bit\NETWORK\ADMIN
D:\oracle\product\11.2.0\client_1\NETWORK\ADMIN
D:\oracle\product\11.2.0\client_2_32_bit\NETWORK\ADMIN
采纳答案by BQ.
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:
tnsping.exe <address>
以调用 SSIS 的相同方式运行(相同的环境设置、路径等)。它会告诉您文件所在的位置:
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.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)