Home » RDBMS Server » Networking and Gateways » dblink to Microsoft SQLServer
dblink to Microsoft SQLServer [message #67083] Thu, 04 September 2003 11:37
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;
Previous Topic: Help with clausule where!!!!
Next Topic: TNS cannot resolve name
Goto Forum:
  


Current Time: Thu Nov 21 22:02:59 CST 2024