Solved

SQL Server cannot find server in sys.servers after I renamed the machine.

Posted on 2008-06-25
4
10,793 Views
Last Modified: 2009-04-20
I renamed my laptop which has a copy of SQL Server 2005 running on it. When I rebooted after renaming the machine I tried running an app which uses the ODBC connection to the SQL Server database and received the following error:

Error -2147467259 Could not find server 'MyNewName' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sysy.servers

I've had this error before when I renamed another comuter but never wrote down the extremely simple solution which if I remember involved the following very easy steps:

running exec sp_addlinkedserver (you'll need to very expliciitly explain the parameters assuming my new machine name is 'MyNewName' etc...I don't know enough about SQL Server!)
selecting from a system table to see two entries (presumably the entry for my oldname and one for the newly added newname with some other fields)
deleting the oldname entry from said system table.

If your answer isn't this simple it probably isn't the answer! Max points too cos it's very very very urgent

Thanks loads in advance
Iain


0
Comment
Question by:iaing1000
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 21868984
here is the official support note:
http://msdn.microsoft.com/en-us/library/ms143799.aspx
0
 

Author Comment

by:iaing1000
ID: 21869299
Hi,

Ta for the quick response. I don't have the old name. How can I find this out? What about this table I alluded to, i.e. will the old name be stored somehwre in one of the system tables?

Thanks
Iain
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21869393
yes, i sys.servers.
0
 

Author Comment

by:iaing1000
ID: 21899372
Hi,

Yes, that all worked perfectly

Thanks again
Iain
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question