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.
I tried different SSH tunnel combinations:
- 127.0.0.1:1521
- 127.0.0.1:1522
- 127.0.0.1:11111
- 127.0.0.107:1522
- 127.0.0.107:11111
But none of them work with imp.exe. Intresting thing that all those combinations works just fine with SQL Developer and Scriptella scripts that use JDBC. 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:
***********************************************************************
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
I fail to see what ssh has for impact here. The database connection is working. ssh only plays a role if you need to tunnel your database connection through ssh. If your normal sql client can connect without this, imp can do the same. Normally ssh is only used to connect to the server, which is not needed in your case.
I hope this helps, Ronald.