redirecting a Linked Server

  • Can you change the server for a Linked Server?  It seems like, in theory, I could code some stuff against a Linked server that pointed to a validation server, then when it was time to go live, switch the actual server in the link to point to the production system.  How come once I save my Linked Server, it seems to disable the General tab so I can't change this stuff?
     
  • Drop / Create will be your only solution.

    maybe this script can gat you on track :

    set nocount on

    print 'Linked Servers voor [' + @@Servername + ']'

    print '------------------- ***********'

    if not exists (select 1 from master.dbo.sysservers where srvid > 0)

    begin

     print 'No linked servers definined'

    end

    else

    begin

     select *

     from  master.dbo.sysservers

     where exists (select 1 from master.dbo.sysservers where srvid > 0)

     

     order by srvid

     

     print 'Linked Server UserSettings for [' + @@Servername + ']'

     print '------------------------------- ***********'

     select S.srvname, L.xdate1, L.xdate2, L.name, L.dbid, L.language, L.isrpcinmap, L.ishqoutmap, L.selfoutmap

     

     FROM master.dbo.sysxlogins L

     inner join  master.dbo.sysservers S

     on L.srvid = S.srvid

     and S.srvname <> @@servername

     order by S.srvid

    end

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • I think a good solution may be a client network utility entry. Create an entry for your development server with the common name for 2 servers like MyCurrentServer. Create  linked server to MyCurrentServer. Then when you want to re-point to your production server change the entry for MyCurrentServer in Client Network Utility to point to your Production server. May work.

    Regards,Yelena Varsha

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

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