Full Path to Database

  • Hello,

    I was looking for some documentation on how to reference a database on a different instance of SQL Server 2000 (and on a different server).

    I thought there was something in BOL on this, but I have not found it. I need to runs some querries where some of the fields are in another database, on another instance, on another server.

    If you have some samples or can point me to some resources, please let me know.

    Thank you for your help!

    CSDunn

  • You need to add a linked server reference (sp_addlinkedserver), possibly with a login (sp_addlinkedserverlogin) when you are not using Windows Authentication.

    Then reference the remote database using:

    server.database.schema.object.

    When querying a remote SQL Server, schema is the object owner.

    Take a look at Distributed Queries in BOL.

     

  • HI ,

    You can use a linked server. Look up linked server on BOL. When you create a linked server use a login name that has the minimum rights to the server for security purposes.

     

     

     


    Andy.

  • Thank you for your help. After I posted this message, I found the information about setting up a linked server. I tried it, and ran into some problems.

    Please see my follow up post in SQL Server \ Administration \ Linked Server Problem.

    CSDunn

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

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