Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TNS-12518 error while trying to fetch data from SQL Server

757001Mar 1 2010 — edited Mar 2 2010
Hi everyone,

I'm trying to establish connectivity from Oracle 10.2 server to a SQL Server 2005. These are the server details

DOVER - This is where I installed Oracle Gateway for SQL Server. There's already an Oracle home in this server and I have used the existing listener for the incoming connections
LUNDY - This is where my actual Oracle server resides
HEBRIDES - This is where SQL Server 2005 instance resides, the database name is TRACKIT90

I've set everything as explained in Oracle documentation http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/ch2.htm#i1005694 but in the end I'm getting an TNS-12518: TNS:listener could not hand off client connection when I run a test query and this is what it says in the listener.log of DOVER

01-MAR-2010 15:33:19 * (CONNECT_DATA=(SERVICE_NAME=tg4msql)(HS=OK)(CID=(PROGRAM=w:\oracle\product\10.2.0\db_1\bin\ORACLE.EXE)(HOST=LUNDY)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.0.0.58)(PORT=3887)) * establish * tg4msql * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
32-bit Windows Error: 2: No such file or directory

My initialization parameter under \\ORACLE_HOME\tg4msql\admin of gateway installation in DOVER is as below:

HS_FDS_CONNECT_INFO=hebrides.TRACKIT90
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER

The listener.ora of the active listener in DOVER has the following lines, by the way this listener does not reside on the same ORACLE_HOME as the gateway's ORACLE_HOME but it is the current active listener in the server. The listener has also been stopped and started:

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dover)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)

SID_LIST_LISTENER =
(SID_DESC =
(SID_NAME = tg4msql)
(ORACLE_HOME = E:\oracle\product\10.2.0\tg_1)
(PROGRAM = tg4msql)
)
)

The following entry has been added to the tnsnames.ora in LUNDY server where my actual Oracle database resides.

TRACKIT_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = DOVER)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = tg4msql)
(HS = OK)
)
)

And finally a database link is created by using the below DDL statement:
CREATE DATABASE LINK "DLINK" CONNECT TO "username" IDENTIFIED BY "password" USING 'TRACKIT_DATA';

When I do a select statement on one of the tables of TRACKIT database by using the following query I got the TNS-12518 error with above details

select * from announcement@dlink;

I would appreciate any help and also please let me know if I missed out any details.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2010
Added on Mar 1 2010
10 comments
3,748 views