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
 Transact-SQL (2005)
 Question - preferred method

Author  Topic 

snufse
Constraint Violating Yak Guru

469 Posts

Posted - 2009-06-25 : 10:57:29
I need to write a stored procedure that connects to 3 different servers (2 - sequel serveres and 1 - db2 server) and retrieves and compares data from all 3 at same time. Wonder what approcah I should take
1. write a query that connects and retrieves data from all servers at same time (in one select...)
2. use temp table, connect to one server at a time and update temp table

Thank you.

Skorch
Constraint Violating Yak Guru

300 Posts

Posted - 2009-06-25 : 12:18:17
Sounds like a job for DTS/SSIS

Some days you're the dog, and some days you're the fire hydrant.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-25 : 13:52:57
quote:
Originally posted by snufse

I need to write a stored procedure that connects to 3 different servers (2 - sequel serveres and 1 - db2 server) and retrieves and compares data from all 3 at same time. Wonder what approcah I should take
1. write a query that connects and retrieves data from all servers at same time (in one select...)
2. use temp table, connect to one server at a time and update temp table

Thank you.


what you need is a ssis pacakge with data flow task containing oledb source connections to run query and retrive data from all sources then oledb command to do updation on relevant tables.
Go to Top of Page
   

- Advertisement -