how to create a dblink from oracle to sql server
Posted by baig on Dec 22, 2020; 5:20pm
URL: http://erman-arslan-s-oracle-forum.124.s1.nabble.com/how-to-create-a-dblink-from-oracle-to-sql-server-tp9179.html
Hi,
I am trying to create a dblink to access a sql server from oracle.
I have configured dblinks successfully from oracle to oracle database.
i have created the db link with below pattern
==> MSSQL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.10.54)(PORT=1433))
(CONNECT_DATA=
(SID=mypdssql) ===> THIS SID SHOULD BE FOR THE TARGET SQL DATABASE?
)
(HS=OK)
)
please suggest.
also when i am trying to tnsping the sql server from oracle it throws the following error.
[oratest@hopdb1 ABC_hopdb1]$ tnsping MSSSQL
TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 22-DEC-2020 16:02:37
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
/u01/ABC/db/tech_st/12.1.0/dbhome_1/network/admin/ABC_hopdb1/sqlnet_ifile.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.10.54)(PORT=1433)) (CONNECT_DATA= (SID=mypdssql)))
TNS-12537: TNS:connection closed