SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


renaming a server


renaming a server

Author
Message
Ian_McCann
Ian_McCann
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2030 Visits: 2309
SELECT @@SERVERNAME AS 'Server Name' returns 'OldName'

I run

sp_dropserver [OldName]
GO
sp_addserver [NewName], local
GO

returns error

Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 56
There are still remote logins or linked logins for the server 'OldName'.
Msg 15028, Level 16, State 1, Procedure sp_MSaddserver_internal, Line 89
The server 'NewName' already exists.

I run

sp_dropremotelogin [OldName]
GO

returns error

Msg 15185, Level 16, State 1, Procedure sp_dropremotelogin, Line 68
There is no remote user '(null)' mapped to local user '(null)' from the remote server 'OldName'.

I think the server has been renamed by our network guys while replication is set up.

Can anyone advise me how to drop the remote logins or linked logins and rename the server

Thanks in advance
JamieX
JamieX
Mr or Mrs. 500
Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)

Group: General Forum Members
Points: 513 Visits: 437
I had an issue like this before so I did a quick search to find what helped me and I realized it was not the same. But I ended up here.

Check page 77

http://www.quest.com/quest_site_assets/whitepapers/sql_server_ebook_a_practical_guide_to_backup,_recovery,_and_troubleshooting_(part_2).pdf
Ian_McCann
Ian_McCann
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2030 Visits: 2309
Thanks Jamie.

Trouble is the physical machine has been renamed.
when I try to disable replication I get the following error

SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'OldName'. (Replication.Utilities)
JamieX
JamieX
Mr or Mrs. 500
Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)

Group: General Forum Members
Points: 513 Visits: 437
I havn't run into this issue before so I'm not sure if I can provide any more help.. but the next things I would try is create an entry in the hosts file on the server with the old hostname and point it to localhost or the server IP. Then try and remove it in SSMS on the server.
Ian_McCann
Ian_McCann
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2030 Visits: 2309
I was unable to resolve this.
Ended up reinstalling SQLSever while nobody was looking, and restored the databases.
I was lucky this time, we had a maintenance window, but if anyone knows how it should be done I would be gratefull if you could share it with me.
Thanks
Ian
MANU-J.
MANU-J.
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2934 Visits: 8766
Was sql server restarted after the appserver command execution was done?

The local definition takes effect only after the server is shut down and restarted. Only one local server can be defined in each server.

http://msdn.microsoft.com/en-us/library/ms174411.aspx

MJ
chris.powell-959917
chris.powell-959917
SSC-Enthusiastic
SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)

Group: General Forum Members
Points: 150 Visits: 66
MJ hit on it, after you rename SQL Server, you MUST restart the server.
Ian_McCann
Ian_McCann
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2030 Visits: 2309
The server was renamed months ago, the server has been shut down and restarted twice in Feb, so i would have to go with in this instance that is not the answer.
Thanks all the same.
Ian
LuisLopez
LuisLopez
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 826
Hi, this is my first post. I have 15 days as a DBA.:-D

I had the same issue and just solve it. I add the 'old server' alias in configuration manager, then disabled publication, and after that exec sp_dropserver and SP_ADDSERVER commands, drop 'old server' alias in configuration manager, and it worked. Sorry for my english. I hope this helps.
Ian_McCann
Ian_McCann
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2030 Visits: 2309
Welcome to the group.
Thanks for the tip, I will keep it in mind if this reoccurs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search