How do you get data from a database on another server ? [Resolved]

Posted by Beingchinmay under Sql Server on 10/6/2016 | Points: 10 | Views : 214 | Status : [Member] | Replies : 3
If you want to import data only through a T-SQL query, then use the
OPENDATASOURCE 
function. To repeatedly get data from another server, create a linked server and then use the
 OPENQUERY 
function or use 4-part naming. If you are not using T-SQL, then
it is better to use the import/export wizard, and you can save it as a SSIS package for future use .

[URL=http://www.sandhisudha-plusoil.in]Sandhi Sudha[/URL] |


Responses

Posted by: Manicse on: 10/11/2016 [Member] Bronze | Points: 50

Up
0
Down

Resolved
Hi,

you can use sp_addlinkedserver

Just a simple step like below,

select

*
from
LocalTable,
[OtherServerName].[OtherDB].[dbo].[OtherTable]


Mani.R

Beingchinmay, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: M_Imranbest on: 10/10/2016 [Member] Starter | Points: 25

Up
0
Down
Configure Linked Server to get data from other server.

Thanks & Regards;
Muhammad Imran Ansari

Beingchinmay, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Celinachristi on: 10/13/2016 [Member] Starter | Points: 25

Up
0
Down
You need sp_addlinkedserver()
http://msdn.microsoft.com/en-us/library/ms190479.aspx
-

Beingchinmay, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response