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.
Author |
Topic |
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2012-05-23 : 23:24:43
|
Hi Forumer’sI would like to create an script that will use 2 server. The first table tableA is stored in server1 and tableB stored in sever2. Is this possible? what are the requirements. Kindly please help me guys on how to do this. thanks in advance.jov |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2012-05-23 : 23:46:01
|
yes it is possible1. Use ssis or2. use linked serversThese are the options that I know of<><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
 |
|
mani_12345
Starting Member
35 Posts |
Posted - 2012-05-24 : 00:04:41
|
heii...I am not sure about this but i guess the solution for this prbm will be : for this you have to create one field in Server1 table that points to the server2 i.e Server2 name and then try to get information ..Just thought for this have not tried yet... |
 |
|
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2012-05-24 : 03:55:57
|
Thank you guys for the reply. @yosiaszI think the option #2,But how could i do this?sample: I have to get some information from table2 under server2 using the table1 under server1.SERVERNAME: SERVER1DBNAME: SAMPLEDB1TABLE: TABLE1--------------------SERVERNAME: SERVER2DBNAME: SAMPLEDB2TABLE: TABLE2 |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-24 : 16:01:43
|
quote: Originally posted by Villanuev Thank you guys for the reply. @yosiaszI think the option #2,But how could i do this?sample: I have to get some information from table2 under server2 using the table1 under server1.SERVERNAME: SERVER1DBNAME: SAMPLEDB1TABLE: TABLE1--------------------SERVERNAME: SERVER2DBNAME: SAMPLEDB2TABLE: TABLE2
see how to add a linked server herehttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=164892once this is then the you can simply use a query like below(assuming linked server is created in SERVER1 for SERVER2) USE [SAMPLEDB1]GOSELECT *FROM dbo.TABLE1 t1INNER JOIN [SERVER2].[SAMPLEDB2],[dbo].TABLE2ON... ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2012-05-24 : 21:28:53
|
Hi Visakh, Thank you very much for this very informative info. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-25 : 10:10:09
|
you're welcomecourtesy: Kristen------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|