connecting SQL 7.0 to oracle 
Author Message
 connecting SQL 7.0 to oracle
Hi i searching for info to know how can i connect SQL 7.0 to oracle
database.
i need know how can install ODBC to oracle. or OLEDB

Thanx



Wed, 04 Dec 2002 03:00:00 GMT
 connecting SQL 7.0 to oracle

Merco,

Look up heterogeneous data query in the books online.  MS supply an OLE-DB
driver.

Quote:
> Hi i searching for info to know how can i connect SQL 7.0 to oracle
> database.
> i need know how can install ODBC to oracle. or OLEDB

Q.     Are there any examples of heterogeneous data queries from SQL 7 to other
sources?

A. Here are a variety of examples for several different datasources.  Note that
you will have to change filenames, drives, regions etc. as necessary for your
environment :-

1.  Selecting from an Excel spreadsheet using OpenRowSet.  Here, c:\ramsql7.xls
is a spreadsheet (note we haven't specified the extension).  sheet1 is a sheet
within the spreadsheet - note the trailing $.

SELECT * FROM OpenRowSet
  ('MSDASQL', 'Driver=Microsoft Excel Driver (*.xls);DBQ=c:\ramsql7', 'SELECT *
FROM [sheet1$]')
  as a

2.  Selecting from an Access linked server database via Jet.  The Access
database is at c:\msd\invent97.mdb

print 'add Jet 4.0 Invent'
-- Clear up old entry
if exists(select * from sysservers where srvname = N'INV')
 exec sp_dropserver N'INV', N'droplogins'
go
-- create linked server


go
-- setup default admin login for Access

go
-- Lists all tables in the linked server
exec sp_tables_ex N'INV'
go
-- Now select from a table in the Access db called INVENT
select * from INV...INVENT
go

3.  DB/2 accessed via Star SQL Driver with SNA 4.0.

print 'add DB2 LinkedServer'
if exists(select * from sysservers where srvname = N'DB2')
    exec sp_dropserver N'DB2', N'droplogins'





go

-- test to see is catalog is accesible
sp_tables_ex N'DB2'

-- create view to see if select works
create view V007MUNI as select * from DB2..T1ADM007.V007MUNI
go
select * from V007MUNI
go

4.  DBASE IV

print 'add DBase IV LinkedServer'
if exists(select * from sysservers where srvname = N'DBFs')
    exec sp_dropserver N'DBFs', N'droplogins'

EXEC sp_addlinkedserver
    'DBFs',
    'Jet 4.0',
    'Microsoft.Jet.OLEDB.4.0',
    'F:\DBFs',
    NULL,
    'dBase IV'
GO

 exec sp_addlinkedsrvlogin





 go

SELECT * FROM DBFs...test
go

5.  Visual FoxPro.  Using a FoxPro DBC file to group the DBF files.  ODBC DSN
pre-defined called FOX using the Microsoft Visual FoxPro Driver 6.01.8440.01

-- FOX using Visual FoxPro Database file .DBC
print 'add FOXSERVER'
if exists(select * from sysservers where srvname = N'FOXSERVER')
 exec sp_dropserver N'FOXSERVER', N'droplogins'










exec sp_tables_ex N'FOXSERVER'

select * from [FOXSERVER].[D:\SQL\FOX\TESTDATA.DBC]..[customer]

6.  FoxPro using plain DBF files in a directory.  Using an ODBC system DSN
(Called DBF) using the Microsoft Visual FoxPro Driver 6.01.8440.01

-- DBF using plain .DBF files
print 'add DBFSERVER'
if exists(select * from sysservers where srvname = N'DBFSERVER')
 exec sp_dropserver N'DBFSERVER', N'droplogins'










exec sp_tables_ex N'DBFSERVER'

select * from [DBFSERVER].[D:\SQL\DBF]..[country]

7.  FoxPro using installable Jet 3.51 ISAM drivers.

print 'add FOXDBC using Jet 3.51'
if exists(select * from sysservers where srvname = N'FOXDBC')
    exec sp_dropserver N'FOXDBC', N'droplogins'
exec sp_addlinkedserver 'FOXDBC', 'Jet 3.51', 'Microsoft.Jet.OLEDB.3.51',
'c:\sql\fox', NULL, 'FoxPro 3.0'

exec sp_helplinkedsrvlogin N'FOXDBC'
exec sp_tables_ex N'FOXDBC'

===

v1.04 1999.04.27
Applies to SQL Server versions  : 7.0, 2000
FAQ Categories                  : Application Design and Programming
Related FAQ articles            : n/a
Related Microsoft Kb articles   : n/a
Other related information       : n/a
Authors                         : Neil Pike
 Neil Pike MVP/MCSE.  Protech Computing Ltd
 (Please reply only to newsgroups)
 SQL FAQ (428 entries) see
 forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps (sqlfaq.zip - L7
- SQL Public)
 or www.ntfaq.com/sql.html
 or www.sql-server.co.uk
 or www.mssqlserver.com/faq



Thu, 05 Dec 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. I can not connect SQL server 7.0 using SQL server 7.0 client

2. I Must connect oracle database whit MS SQL 7.0

3. Connecting to an Oracle DB with SQL 7.0

4. I Must connect oracle database whit MS SQL 7.0

5. How to connect to a SQL 6.5 server using SQL 7.0

6. connect SQL 6.5 server using SQL 7.0 Ent.Mgr

7. Can SQL 7.0 client connect to SQL 6.5 ?

8. Can't connect to both SQL 6.5 and SQL 7.0 from ASP

9. How to connect to a SQL 6.5 Server via SQL 7.0 Enterprise Manager

10. Remote connect: SQL 2000 Vs. SQL 7.0

11. Keep third party software from connecting to our production database servers (SQL 7.0 and SQL 2000)

12. Can Someone Tell: How to Connect Sql 6.5 to Sql 7.0


 
Powered by phpBB® Forum Software