Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-06-25
4
Medium Priority
?
10,943 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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 ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

618 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