Results 1 to 4 of 4

Thread: Linked Server

  1. #1
    Join Date
    Apr 2005
    Posts
    37

    Unanswered: Linked Server

    i have 2 servers which are remote. i have connected them through the linked server option. since they are remote, the names were the ip address.
    if i look into the tables, i can see the tables.

    i am stuck with actualy referecing or querrying those tables. how do i querry a remote server which is linked using the linked server option??

    thnks!

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by anizami
    i have 2 servers which are remote. i have connected them through the linked server option. since they are remote, the names were the ip address.
    if i look into the tables, i can see the tables.

    i am stuck with actualy referecing or querrying those tables. how do i querry a remote server which is linked using the linked server option??

    thnks!
    Look in SQL Books for OPENROWSET or OPENQUERY.

    regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    This works for me:

    [ServerName].DatabaseName.Owner.TableName
    Paul

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    the differance between the 4 part table name and OPENQUERY is that the first processing the query from the calling server and the latter from the linked server.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •