Solved

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

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

813 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

17 Experts available now in Live!

Get 1:1 Help Now