Avoid four-part name with linked server

  • Hi,

    Is there any way to avoid using four-part name when accessing a SQL linked server ?

    I know that this could be done with rowset functions (openrowset or openquery) but maybe there is another way of doing things...

    Tia,

    Eric

  • Exactly what is it that you want to avoid? Could you expand on your particular issue?

    Technically, you can't avoid specifying the remote servername in any case - openrowset or openquery also requires that info, though in another syntax than 'four-part naming'. In the end, if it's an issue of wanting not to specify servername at all, but still be able to reach a remote server, then no... you can't do that.

    /Kenneth

  • Also,

    To minimize the impact you can use and ALIAS on the linked server to increase portability also you could embed the access through a view! so that only references to the view and not to the server would be necessary.

    HTH

     


    * Noel

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

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