asked on
Hi,
We are running into challenge while connecting to SQL server 2008 hosted on Windows server 2008 machine from Oracle database server running on 12c. The objective is to establish db link between Oracle and MSSQL server to
view the sql server data. Both Oracle and MSSQL server are running on 2 different host machine. For this we performed the following steps
a) From the oracle server changed the parameter inithsodbc.ora (D:\app\crm.sa\product\12.2.0\dbhome_1\hs\admin
HS_FDS_CONNECT_INFO = mysource1
HS_FDS_TRACE_LEVEL = OFF
b) Modified tnsnames.ora to point to mysource1
mysource1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dhqdbp25.doti.ae)(PORT = 1433))
)
(CONNECT_DATA =
(SERVICE_NAME = mysource1)
(HS=OK)
)
)
c) Modified listener.ora
(SID_DESC =
(SID_NAME = mysource1)
(ORACLE_HOME = D:\app\crm.sa\product\12.2.0\dbhome_1)
(PROGRAM = HSODBC)
)
)
d) Finally created odbc connect string(mysource1) from system dsn hosted on oracle database server
and the connection was tested successfully.
Finally we tested with tnsping to mysource 1
C:\Users\crm.sa>tnsping mysource1
TNS Ping Utility for 64-bit Windows: Version 12.2.0.1.0 - Production on 26-SEP-2021 03:43:48
Copyright (c) 1997, 2016, Oracle. All rights reserved.
Used parameter files:
D:\app\crm.sa\product\12.2.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dhqdbp25.doti.ae)(PORT = 1433))) (CONNECT_DATA = (SERVICE_NAME = mysource1) (HS=OK)))
TNS-12537: TNS:connection closed
ASKER
ASKER
ASKER
mysource1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = mysource1))
(HS=OK)
)
All the real connection info is managed by the ODBC DSN reference in inithsodbc.ora.ASKER
ASKER
ASKER
MYSOURCE1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dhqdbd22.dotstg.ae)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = mysource1)
)
)
Is there validation that can be performed against above tns entry. mysource1 is configured in system dsn pointing to sql server databaseASKER
ASKER
ASKER
(SID_DESC =
(SID_NAME = HSListenerSID)
(ORACLE_HOME = D:\app\crm.sa\product\12.2.0\dbhome_1)
(PROGRAM = dg4odbc)
)
TNS_MsSql =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = HSListenerHost)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = HSListenerSID)
(HS=OK)
)
(btw, you forgot that (HS=OK) line in your last TNSNames post).HS_FDS_CONNECT_INFO = mysource1
Note that the name is not inithsodbc.ora, that is just the template name for your own init files.ASKER
ASKER
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
can you connect from SQL Server to Oracle? It appears you have problems connecting FROM Oracle to SQL Server.. is sql server setup for sql authentication?