Solved

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

Posted on 2008-06-25
4
10,719 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 142

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 142

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now