Data access between two SQL Server instances

  • Hi

    How to access data stored in two SQL Server instances running on two different machines.

    Any help in this regard would be highly appreciated.

    Regards

    Chandu

     

     

  • use sp_addlinkedserver Stored Procedure to connect to the database you want to accessdata from and you should be able to access data between any number of instances like

    select * from <Server Name>.<DB Name>.<Owner like dbo>.<Table Name>

    with appropriate conditions and relationships whatsoever.

    Prasad Bhogadi
    www.inforaise.com

  • you could also created a linked server through EM or use the sp_addlinkedserver SP and then use the OPENQUERY - something like

    SELECT *

    FROM OPENQUERY(SERVERNAME, 'SELECT *  FROM TABLE_NAME')

  • Thanks for the response.

    How to create linked server through EM?

    Regards

    Chandu

     

     

  • Open EM --> DB -->security-->right click linked server-->new linked server.  Its pretty basic from there

  • Thanks Vikram.

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

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