December 27, 2008 at 7:35 pm
I ran the following script and changed server name of default instance in sql server 2005.
sp_dropserver 'old server name'
go
sp_addserver 'new server name', local
go
And I review the server name using "select @@servername". It changed.
However, I still cannot connect sql server using the new name. but i can connect the sql server using machine name or maybe old name.
Will machine name change when i changed the sql server name (default instance)?
And when i view properties of sql server, name still be the old name or machine name.
Can anyone tell me the trick inside?
Thank you so much.
December 28, 2008 at 12:12 am
If you are renaming the SQL Server you should also rename the physical server so as not to confuse things greatly.
The physical layer is what allows the user to connect using the netbios or DNS name. Without changing that name changing the internal reference of SQL Server is meaningless as you would not be able to find the name on the network. You could refer to it still as the old name and could connect with the old name or the IP address. Things get confused though when you attempt to reference the renamed SQL install.
Either change the SQL server back to the original, or rename the physical server on which is resides to match the name that you set SQL server to.
December 28, 2008 at 6:09 am
try the following query
select @@servername, serverproperty('servername')
what is the result
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
December 28, 2008 at 6:37 am
I don’t think that it is supported to change the SQL Server’s name so it will not include the server’s (OS) name. The fallowing is taken from ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/bbaf1445-b8a2-4ebf-babe-17d8cf20b037.htm (How to: Rename a Computer that Hosts a Stand-Alone Instance of SQL Server 2005)
“The following steps cannot be used to rename an instance of SQL Server 2005. These steps can be used only to rename the part of the instance name that corresponds to the computer name. For example, you can change a computer named MB1 that hosts an instance of SQL Server named Instance1 to another name, such as MB2. However, the instance portion of the name, Instance1, will remain unchanged. In this example, the \\ComputerName\InstanceName would be changed from \\MB1\Instance1 to \\MB2\Instance1.”
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 28, 2008 at 8:47 am
How to: Rename a Computer that Hosts a Stand-Alone Instance of SQL Server 2005:
- http://msdn.microsoft.com/en-us/library/ms143799(SQL.90).aspx
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply