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
 .NET Inside SQL Server (2005)
 Exec Query using databases on separate servers

Author  Topic 

Greg_01
Starting Member

4 Posts

Posted - 2009-07-13 : 13:52:38
Hi Guys,

I have started working with .NET and SQL and can do the basics. However I have ran into a problem. I have a SQL query that is stored in a file which then the SQL CLR executes and stores the results in a table. That part works great. Now I have a requirement where the SQL query needs to combine data from two different databases on two different servers. I need to be able to do this through the CLR. I don't want to use linked servers. Is there a way that when I run execute sql command I can pass in two sql connections. I really have no idea where to start.

Any ideas I would greatly appreciate.
Thank you,
Greg

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-13 : 14:08:26
have you looked into distributed query options like OPENROWSET?
Go to Top of Page

Greg_01
Starting Member

4 Posts

Posted - 2009-07-13 : 14:23:02
No, I haven't herd of OPENROWSET. I will do research now and see if I can apply it.

Thank you
Go to Top of Page
   

- Advertisement -