Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Connect to oracle

Author  Topic 

mrajani
Starting Member

13 Posts

Posted - 2007-09-27 : 10:28:34
Hi friends,

I have SQL Server installed and running. I need to get data from oracle to my local server. This should be on a scheduled basis. During this I dont need to get imported the existing records.

How can I make it done.

Can anybody explain me in detail. I need it to be complete in 1 day.

Thanks in advance

nr
SQLTeam MVY

12543 Posts

Posted - 2007-09-27 : 11:02:49
Load the oracle client.
Add a tns entry for the server
Add this as a linked server
Use openquery to get the data

See here for an SP which will return data from the oracle query. Note the query will be pl/sql not t-sql.
http://www.nigelrivett.net/SQLTsql/sp_ExecLinkedServer.html

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

mrajani
Starting Member

13 Posts

Posted - 2007-09-27 : 11:32:25
Hi,
Thanks for the reply. But, I dont have oracle client. I used SQL MS Import wizard. How can I run this on a scheduled basis and also I need to import only 2 tables from oracle. First I will do a direct copy of the table(which is replica of oracle table). But How can I stop copying the existing records?

And I need to import to my local(Sql Server) table with the required fields only. And this also to be run on a scheduled basis.

This is my task.

How can I achieve this.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-27 : 11:34:22
"But How can I stop copying the existing records?"

Using DTS / Import Wizard I don't suppose you can.

But you should be able to using OPENQUERY - if you can install Oracle Client etc. as Nigel described.

Kristen
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-28 : 00:18:40
You can download oracle client from oracle's web.
Go to Top of Page
   

- Advertisement -