Getting data from another SQL Server

  • I want to write a proceedure that will be set off by a table insert trigger. The proceedure will look up data in a database on another SQL Server and use it to ubdate a record in the current database.

    Is this possible in SQL Server? If it is would someone be kind enough to give me an overview of how it can be done (I am assuming that the servers will need to be linked).

    Thanks

    RB

  • In SQL it's possible, you just create a linked server to the destination server

  • In addition to creating a linked server connection, use OPENQUERY in your stored procedure to send a pass-thru query to the remote database.  See "Distributed Queries" in Books OnLine.

    Greg

    Greg

  • Thanks, I'll give it a go.

Viewing 4 posts - 1 through 4 (of 4 total)

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