SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 
        
Home       Members    Calendar    Who's On



URGENT: Problem with SQL Server Linked Servers and sp_setnetname Expand / Collapse
Author
Message
Posted Thursday, November 05, 2009 10:00 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 11:13 PM
Points: 174, Visits: 92
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.
Post #814691
Posted Friday, November 06, 2009 11:06 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 3:59 PM
Points: 1,747, Visits: 2,495
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
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs
Post #815094
Posted Friday, November 06, 2009 8:46 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 11:13 PM
Points: 174, Visits: 92
Thanks,
We have got another solution and we have implemented it already.
Post #815289
Posted Friday, November 06, 2009 10:05 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 10:06 AM
Points: 286, Visits: 1,039
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!


---------------------------------------------------------------------------------
Convert(DBA,me,developer) .... Error converting 'you' from developer to DBA!! Missing Experience
Post #815315
« Prev Topic | Next Topic »


Permissions Expand / Collapse