-
Access data from 2 different SQL Server
Hi all,
can any one tell me as how can I get the data from different Server.
suppose I have configured 2 different SQL Server in SQL Server Group, abc and xyz. I want to access the data from both server for comparing or some addition/deletion. Is there any method by which I can achieve this?
Thanks in advance,
Sachin
-
Access data from 2 different SQL Server (reply)
There are other ways but try
SELECT Company.CompanyID FROM
OPENROWSET('SQLOLEDB',
'DRIVER={SQL Server};SERVER=server name or IP here; UID=username here;PWD=password here',
dbo.Company ) as Company
------------
Sachin at 2/18/2002 11:39:54 PM
Hi all,
can any one tell me as how can I get the data from different Server.
suppose I have configured 2 different SQL Server in SQL Server Group, abc and xyz. I want to access the data from both server for comparing or some addition/deletion. Is there any method by which I can achieve this?
Thanks in advance,
Sachin
-
Access data from 2 different SQL Server (reply)
There are other ways but try OPENROWSET which can be found in Books on Line
i.e
SELECT Company.CompanyID FROM
OPENROWSET('SQLOLEDB',
'DRIVER={SQL Server}; SERVER=server name or IP here; UID=username here;
PWD=password here', dbo.Company ) as Company
------------
Sachin at 2/18/2002 11:39:54 PM
Hi all,
can any one tell me as how can I get the data from different Server.
suppose I have configured 2 different SQL Server in SQL Server Group, abc and xyz. I want to access the data from both server for comparing or some addition/deletion. Is there any method by which I can achieve this?
Thanks in advance,
Sachin
-
Access data from 2 different SQL Server (reply)
You can also set up a linked server on server 1 pointing to server 2 and then use the full four part name for the table in the query running on server 1:
select *
from linkedservername.databasename.ownername.tablename
------------
Sachin at 2/18/2002 11:39:54 PM
Hi all,
can any one tell me as how can I get the data from different Server.
suppose I have configured 2 different SQL Server in SQL Server Group, abc and xyz. I want to access the data from both server for comparing or some addition/deletion. Is there any method by which I can achieve this?
Thanks in advance,
Sachin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|