May 22, 2007 at 12:27 pm
I have been working for some time on a replication issue. To try to trouble shoot it in house I installed SQL 2005 Workgroup (with SP2) onto my vista Business laptop.
As with vista boxes when Vista was setup it had the name of "(user)-PC" and I changed the name to M1210
When I try to "Configure Distribution" It wants me to connect to the compute by the name... Which I have already done.
Here is a screen shot of the error.
So the skinny of it is... Where is it getting the old computer name from... and how do i fix this????
July 14, 2008 at 8:45 am
Since no one provided me an answer I have found it my self long ago at this point. I am posting it here in hopes that it will help some one else if they rename their servers. Keep in mind that when you rename a server it can mess up lots of other things. Such as .net... here is the solution to renaming a SQL server though.
My Original question: where is it getting the old computer name?
Answer: SQL Stores the server name in a paramiter called @@server
Here is how to fix it. I beleave I got this from MS them selves in one of their forums.
How to fix @@SERVERNAME in SQL Server 2005
Thursday, September 21 2006 @ 05:40 PM EST Contributed by: Julian-Kuiters
Views:: 994
It seems to happen from time to time: your network engineers decide on a new network topology or naming scheme and they want to rename one or more of your SQL Server machines or worse your desktop machine!
Renaming a SQL Server instance is not as simple as renaming the computer in My Computer Properties. After you've restarted windows, you will find that while the instance is now available on the network with the new machine name, internally @@SERVERNAME will probably still be using the old name. This will upset a number of features within SQL Server and Management Studio and some 3rd party tools.
Using the following sql, you can see if @@SERVERNAME has the incorrect value:
SELECT @@SERVERNAME As [@@SERVERNAME],
CAST(SERVERPROPERTY('MACHINENAME') AS VARCHAR(128)) + COALESCE('' +
CAST(SERVERPROPERTY('INSTANCENAME') AS VARCHAR(128)), '') As RealInstanceName Both @@SERVERNAME and RealInstanceName should be identical. After a recent name change my results looked like this:
@@SERVERNAME RealInstanceName
--------------------------------- ---------------------------------
IAUTO-124F92 JKUITERS-DEV
To correct @@SERVERNAME for a default instance use the following commands:
exec sp_dropserver old_name
GO
exec sp_addserver new_name, 'local'
GO
To correct @@SERVERNAME for a named instance:
exec sp_dropserver old_nameinstancename
GO
exec sp_addserver new_nameinstancename, 'local'
GO
Download the sql script to fix your @@SERVERNAME.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply