Query between Servers

  • Hi all,

    I currently have 2 Dbs; lets call them DBLive and DBReport running on the same server.

    I have a stored proc on DBReport which extracts data from DBLive. I pass @sourceDB sysname to the SP to identify the database to extract from.

    In the near future I will need to move DBReport to a different server so my question is this:

    How does one execute a query on one server to connect to another server to retrieve data?

  • You can add second server as linked server and an query using full reference name of object like servername.databasename.schema.object

    Regards,
    Nitin

  • linked server is one of your options

    -Vikas Bindra

  • Already answered by Nitin 🙂

    -Vikas Bindra

  • Thanks!

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

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