Need to get data from one server to another server

  • Hi Guys..

    Is there any queries to get a data from server A to server B?

    For Eg Am working in Server B but I need to take record from server A. So how we can write a query for this... Please suggest me

  • parmsivan.kannan (12/3/2014)


    Hi Guys..

    Is there any queries to get a data from server A to server B?

    For Eg Am working in Server B but I need to take record from server A. So how we can write a query for this... Please suggest me

    You can create a link between servers and query the record from server A while working on server B.

    SELECT *

    FROM srvB.db.schema.table

    refer to below link for more information about creating a linked server:

    http://msdn.microsoft.com/en-us/library/ff772782.aspx

  • Is this a one time thing? Is this a stored procedure that's running every few minutes? I generally don't like to create linked servers for both security and performance issues.

  • Hi

    Thanks

  • Hi

    You can get result in both ways:

    1. Linked server

    2. Open query

    To simplify the query you can create synonym on those tables. This is the normal way to access from another server.

  • I prefer using OPENQUERY to linked servers so that I can pass parameters to the linked machine in order for it to do as much filtering of data as possible there. Otherwise, you may see large data sets moved between machines that you don't want.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply