Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding out old machine name

Status
Not open for further replies.

MikeB2002

Technical User
Jul 7, 2002
5
AU
I accidentally changed the name on a PC running SQL Server 7.0, and since doing so the SQL Server service won't start. I understand that if I rename the PC back to its old name the service should start again.

The problem that I have is that I don't know what the old name of the PC was. Can anyone tell me how to find out the name, I am assuming that I could find this out through a log file or registry entry, but haven't been able to find it yet....Thanks.
 
Use sp_adserver to assign the new name of your PC to the server. I believe this can work even without explicitly dropping the previous name (sp_dropserver).

You can also find the name of all servers (local and linked ones) in the SYSSERVERS table in the MASTER database.

Good luck.

Hope this works...
 
It is difficult, er... impossible, to run sp_addserver or to view the sysservers table if SQL Server will not start!

Open the registry and look at the following keys. You should find an entry that will tell you the name of SQL Server which should be the old PC name.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSSQLSERVER

HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer Terry L. Broadbent - DBA
SQL Server Page:
If you want to get the best answer for your question read faq183-874.
 
My bad. I normally don't recommend messing with the registry but if that helps and you know what you're doing then go ahead!

After you open the registry editor (type regedit.exe at the command prompt), you can search for the value that is the old name of your PC, i.e "EAST-SRV"...what you do next is up to you, whether you want to replace the old name with the new one...

Good luck.

PS: There are instances where you are able to run sp_addserver to rename your PC, otherwise it would not exist...

 
I didn't recommend "mesing with the registry." Unless viewing it is messing with it.

Mike,

As I have thought about it, I realized that I answered your specific question but really didn't give you the correct answer. When you change the name of the PC or Server that is running SQL 7, all you have to do is run SQL Server setup. The setup program will recognize that the name has changed and will update the SQL Server configuration accordingly. After updating the configuration, setup will exit without changing or installing anything else. You should then be able to start SQL Server. Terry L. Broadbent - DBA
SQL Server Page:
If you want to get the best answer for your question read faq183-874.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top