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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having trouble with local DB after changing computer name 1

Status
Not open for further replies.

BobRodes

Instructor
May 28, 2003
4,215
US
One of the admins in my department renamed a machine I'm going to be working with. On the machine before renaming, a copy of SQL Server 7.0 ran ok. Now, the local registration fails to open. In Enterprise Manager, I deleted the old registration and attempted to put in a new one. I tried both the new name of the machine and (LOCAL) as servers to register, and neither worked (SQL Server does not exist or access denied). I'm able to register other SQL Server instances on the network that my domain account can see.

Can someone help me untangle this?

TIA

Bob
 
have you tried to use 127.0.0.1?

make sure it is listening on 1433, assuming you are using TCP/IP

you can use netstat -an | find "1433" to make sure it is listening on 1433.

Q
 
First you need to tell the SQL Install what it's new name is.

Code:
exec sp_dropserver 'OldServerName'
go
exec sp_addserver 'NewServerName', 'local'
go
Then restart the SQL Service. See if it will register now.

Check the ERRORLOG and make sure that the SQL Service is actually starting correctly.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
qsac, I checked and it doesn't appear to be listening on 1433. I'd like to check mrdenny's reply first, and if it doesn't resolve the issue, I'll revisit that. Thanks for your input.

mrdenny, I don't know where to add your commands, since I can't get the sql service running at all. I guess I'm not sure how to "tell the SQL Install what its new name is."

Presently, when I open Enterprise Manager, there are no items in any groups. (I deleted the registration of the old server, since it was failing to open.) I can register instances of SQL server that are on other nodes, but not the one that's on my local machine. I get the error I described above when I attempt to. Is going into the Enterprise Manager and selecting "New SQL Registration" the same thing as running sp_addserver?

Thanks,

Bob
 
Bob,

Step back for a minute. Is the SQL Server Service started?

Start -> Run
Services.msc

Scroll to MSSQLSERVER

It should be started and set to automatic.

Ordinarily, you'd think... Since I can open the Enterprise Manager, that would mean that the service is started. This, in fact, is NOT correct. In fact, you can run the Enterprise Manager on a computer that does not have SQL Server installed on it.

If the service is not started, try starting it manually. If the service fails to start, then check the error log. there should be info in there regarding WHY the service didn't start.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks George...the status in the services column is blank, and the SQL service manager has the red square on it, and the tooltip says "stopped - \\myserver - MSSQLServer". So, I assume that it isn't running, although it is set to automatic. Attempting to start manually says it wouldn't start due to a logon failure. Finally, I'm not sure how to check the error log, not much of an engineer I'm afraid, perhaps you can tell me.

Thanks again,

Bob
 
Use the event viewer. On XP... Start -> Programs -> Administrative Tools -> Event Viewer

>> Attempting to start manually says it wouldn't start due to a logon failure


Right click on the service. Go to properties. There should be a Log On tab. On my computer, I have 'Local System Account', which seems to work well for me. You can probably use your own account (or any domain user account), but beware. The password is stored by the service, so, if you change your password later, then the sql server service will not start. Some people actually create an account just for the SQL Server service. Make sure you give it a strong password, give the account appropriate permissions, and then forget about the account. Either way, you'll need to 'mess around' with the logon tab to get the service to start.


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks George...

>Event viewer...slippery little devil in the "user friendly" xp environment. Found it easily after switching to classic view.

>Log on, etc...That solved it! The user was the user who had vacated the machine. I set it to local system account, started the service, and up came the green triangle. The rest was cake.

For those of you who don't know, George is an MVP not only in quite a number of the forums, but in the overall one as well. We see one another a good deal more often in the VB forum. Star for you, George; you're one of the hardest working people on here, and your knowledge base is one of the broadest I've seen. I appreciate all the hard work.

Thanks very much,

Bob
 
Now I'm blushing. [blush]

Seriously, though. I'm glad you got your problem solved. Now you can get down 'real' work.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
<Now you can get down 'real' work.
Such as moving all of the stuff from my Win2000 machine to this one, and then I probably get to crawl around on the floor and try to plug in cables that are too short that I can't see.

Thanksgiving can't be that far off...... :)
 
Sooner for me. I'm going on vacation to Disney world. Maybe Mickey could use some SQL Server help.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Well, that would be such fun one could hardly even call it a working vacation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top