Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to connect to a DSN destination from SQL Server

Status
Not open for further replies.

mozhi

Technical User
Dec 12, 2001
5
0
0
US
I need to connect to an external database using SQL Server. The external database is Oracle and I need to update certain tables from the SQL Server and need help in doing it.

I need to select the columns of table 1 in SQL Server and insert it into an Oracle Databse table, based on an update trigger.

Need to solve this asap and appreciate any help provided.
 
Dear ;

I think you can use following.

For example, first you have to link this server using system sp sp_addlinkedserver and then use your required query.

EXEC sp_addlinkedserver 'OracleSvr',
'Oracle 7.3',
'MSDAORA',
'ORCLDB'
GO

SELECT *
FROM OPENQUERY(OracleSvr, 'SELECT name, id FROM joe.titles')

GO

For more descriptions u can go through the help of that SP:

Accessing Linked Servers
After a linked server is created using sp_addlinkedserver, it can be accessed using:

Distributed queries. Accessing tables in the linked server through SELECT, INSERT, UPDATE, and DELETE statements using a linked server-based name.


Remote stored procedures. Stored procedures can be executed against the linked server using a four-part name.


Regards,
M. Essa Mughal
Senior Software Engineer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top