简体   繁体   English

通过隧道连接的Oracle的imp.exe问题

[英]Oracle's imp.exe problems over tunneled connection

We have an Oracle server running in a remote server which only has an SSH connection and we need to run data import process against that. 我们有一台运行在远程服务器上的Oracle服务器,它只有一个SSH连接,我们需要针对它运行数据导入过程。

I tried different SSH tunnel combinations: 我尝试了不同的SSH隧道组合:

  • 127.0.0.1:1521 127.0.0.1:1521
  • 127.0.0.1:1522 127.0.0.1:1522
  • 127.0.0.1:11111 127.0.0.1:11111
  • 127.0.0.107:1522 127.0.0.107:1522
  • 127.0.0.107:11111 127.0.0.107:11111

But none of them work with imp.exe. 但它们都不能与imp.exe一起使用。 Intresting thing that all those combinations works just fine with SQL Developer and Scriptella scripts that use JDBC. 有趣的是,所有这些组合在使用JDBC的SQL Developer和Scriptella脚本中都能正常工作。 The following error is shown in standard error output: 标准错误输出中显示以下错误:

IMP-00058: ORACLE error 12514 encountered
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
IMP-00000: Import terminated unsuccessfully

And the following appears in the sqlnet.log: 以下内容出现在sqlnet.log中:

***********************************************************************
Fatal NI connect error 12514, connecting to:
 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=tktdb1)(CID=(PROGRAM=C:\oraclexe\app\oracle\product\10.2.0\server\bin\imp.exe)(HOST=...)(USER=...)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=11111)))

  VERSION INFORMATION:
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production
  Time: 07-MAR-2011 10:53:26
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12564
    TNS-12564: TNS:connection refused
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0

Any ideas? 有任何想法吗?

I asume that the connect strings are correct. 我认为连接字符串是正确的。 If they are: does you database happen to be in restricted mode? 如果是:您的数据库是否恰好处于受限模式? In that case, the service it supports are not available for connections. 在这种情况下,它支持的服务不可用于连接。 If that is the case, try connecting with a tns alias using SID=xxx 如果是这种情况,请尝试使用SID = xxx连接tns别名

I fail to see what ssh has for impact here. 我没有看到ssh在这里有什么影响。 The database connection is working. 数据库连接正常。 ssh only plays a role if you need to tunnel your database connection through ssh. 如果您需要通过ssh隧道数据库连接,ssh只起作用。 If your normal sql client can connect without this, imp can do the same. 如果普通的sql客户端可以在没有这个的情况下连接,那么imp也可以这样做。 Normally ssh is only used to connect to the server, which is not needed in your case. 通常,ssh仅用于连接服务器,在您的情况下不需要。

I hope this helps, Ronald. 罗纳德,我希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM