URGENT: Problem with SQL Server Linked Servers and sp_setnetname

  • Following is the code in which we are getting the error.

    Step 1: Created Linked Server

    EXEC sp_addlinkedserver 'Reddevil','','MSDASQL',NULL,NULL,

    'DRIVER={SQL Server};SERVER=190.12.34.23;UID=sa;PWD=sa;'

    Step 2:

    DECLARE @ip VARCHAR(25)

    SET @ip = '190.12.34.23'

    EXEC sp_setnetname 'RedDevil',@ip

    SELECT * FROM RedDevil.DatabaseName.dbo.clients

    ERROR:

    You cannot set network name on server 'RedDevil' because it is not a linked SQL Server.

  • Did you check that the linked server is available at all?

    (e.g. by test the connection using right click on the linked server in SSMS?)

    Btw: Seems like the question wasn't that urgent after all...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Thanks,

    We have got another solution and we have implemented it already.

  • deepakkn (11/6/2009)


    Thanks,

    We have got another solution and we have implemented it already.

    Wouldn't it be nice if you can post that solution also please? so that when someone goes through this thread, they can also see what that other solution was!

    ---------------------------------------------------------------------------------

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

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