Home » SQL & PL/SQL » SQL & PL/SQL » dblink to Microsoft SQLServer
dblink to Microsoft SQLServer [message #8620] Thu, 04 September 2003 11:36 Go to next message
Alexander
Messages: 109
Registered: May 2000
Senior Member
I am needing to reference tables in a Microsoft SQLServer database. I have tried
reading the documentation of setting up dblinks. It claims Oracle should be
able to read any external file or database.

So I have tried configuring my access using the following login and code.
Unfortunately, when I go to run the final query, SQLPlus Worksheet says it
can not find an tnsnames entry for @SQLSVR.

PLEASE HELP>>>> What am I doing wrong.

/******** My Microsoft SQLServer(2000) Setup *********************/
a user id called: login_id
a password of: password_phrase
the database to be accessed: mydatabase

/******** I have the following entry in my tnsnames.ora file *********************/
SQLSVR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = testmachine)(PORT = 1521))
)
(CONNECT_DATA =
(SID = SQLSVR)
)
)

/********** create a dblink to the Microsoft SQLServer database **********/
drop database link SQLSVR;
commit;

create database link SQLSVR
connect to login_id
identified by password_phrase
using 'mydatabase';

/********** now try accessing a table in the sqlserver **********/
select count(*) from sysobjects@SQLSVR;
Re: dblink to Microsoft SQLServer [message #9577 is a reply to message #8620] Fri, 21 November 2003 01:31 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Hi,

It's not so easy to setup a database link to SQL Server. As far as I understand, you need to setup an Oracle Gateway to act as an intermediary between MS-SQL and Oracle.

On the other hand, it is quite easy to configure SQL's DTS to export/import data from/to Oracle.

Best regards.

Frank
Previous Topic: How would I do this?
Next Topic: plz its urgent LOB problem
Goto Forum:
  


Current Time: Fri Apr 26 07:16:37 CDT 2024