Home » RDBMS Server » Networking and Gateways » Read SQL Server table from Oracle (11.2.0.1 SQL Server 2005 Enterprise Edition )
Read SQL Server table from Oracle [message #604503] Tue, 31 December 2013 08:36 Go to next message
GirishSharma
Messages: 22
Registered: March 2010
Junior Member
Hi,
Oracle 11.2.0.1
Windows XP Prof Edition

After creating DSN name opd when I tried to connect sql server Enterprise Edition 2005 database on the same PC, I failed to establish connectivity.

Here it is what I have and done :

C:\Documents and Settings\Administrator>type %oracle_home%\network\admin\listener.ora
# listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.


SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM=extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC=
(SID_NAME = opd)
(ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = dg4odbc)
)
)


LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = newserver4)(PORT = 1521))
)
)


ADR_BASE_LISTENER = C:\app\Administrator




C:\Documents and Settings\Administrator>type %oracle_home%\network\admin\tnsnames.ora
# tnsnames.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.


ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)


LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = newserver4)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)


opd =
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=newserver4)
(PORT=1521)
)
)
(CONNECT_DATA=(SID=opd))
(HS=OK)
)


C:\Documents and Settings\Administrator>type %oracle_home%\network\admin\sqlnet.ora
# sqlnet.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.


# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.


SQLNET.AUTHENTICATION_SERVICES= (NTS)


NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)




C:\Documents and Settings\Administrator>lsnrctl status


LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 31-DEC-2013 18:26:13


Copyright (c) 1991, 2010, Oracle. All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
Start Date 31-DEC-2013 18:05:31
Uptime 0 days 0 hr. 20 min. 43 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File c:\app\administrator\diag\tnslsnr\newserver4\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=newserver4)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "opd" has 1 instance(s).
Instance "opd", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully


C:\Documents and Settings\Administrator>tnsping opd


TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 31-DEC-2013 18:26:29


Copyright (c) 1997, 2010, Oracle. All rights reserved.


Used parameter files:
C:\app\Administrator\product\11.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=newserver4) (PORT=1521))) (CONNECT_DATA=(SID=opd)) (HS=OK))
OK (40 msec)


C:\Documents and Settings\Administrator>type %oracle_home%\hs\admin\initopd.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC


#
# HS init parameters
#
HS_FDS_CONNECT_INFO = opd
HS_FDS_TRACE_LEVEL = off




#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>


C:\Documents and Settings\Administrator>sqlplus scott/tiger


SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 31 18:27:18 2013


Copyright (c) 1982, 2010, Oracle. All rights reserved.




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> drop database link opd;


Database link dropped.


SQL> create database link opd connect to "sa" identified by "girish" using 'opd';


Database link created.


SQL> select count(*) from ny@opd;
select count(*) from ny@opd
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified {IM002}
ORA-02063: preceding 2 lines from OPD




SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


C:\Documents and Settings\Administrator>


Thanks and Regards
Girish Sharma
Re: Read SQL Server table from Oracle [message #604529 is a reply to message #604503] Tue, 31 December 2013 13:25 Go to previous messageGo to next message
Littlefoot
Messages: 19648
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Have a look at this Maaher's walkthrough.
Re: Read SQL Server table from Oracle [message #604573 is a reply to message #604503] Wed, 01 January 2014 08:12 Go to previous messageGo to next message
GirishSharma
Messages: 22
Registered: March 2010
Junior Member
Yes, Now I am able to read the sql server table by just creating SYSTEM DSN, rather than user dsn.

Thank you for such a great link.

Regards
Girish Sharma
Re: Read SQL Server table from Oracle [message #604590 is a reply to message #604573] Wed, 01 January 2014 13:00 Go to previous message
Littlefoot
Messages: 19648
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It is Maaher who is great.

[Updated on: Wed, 01 January 2014 13:00]

Report message to a moderator

Previous Topic: Connection problem with DBLINK
Next Topic: DB LINK USING INTERNET
Goto Forum:
  


Current Time: Wed Oct 01 02:14:42 CDT 2014

Total time taken to generate the page: 0.10545 seconds