?
Solved

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

Posted on 2008-06-25
4
Medium Priority
?
10,872 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.
Suggested Courses

752 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