dbTalk Databases Forums  

What things have to do when hostname of SQL server 2008 change?

microsoft.public.sqlserver.setup microsoft.public.sqlserver.setup


Discuss What things have to do when hostname of SQL server 2008 change? in the microsoft.public.sqlserver.setup forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ming伯
 
Posts: n/a

Default What things have to do when hostname of SQL server 2008 change? - 05-06-2010 , 09:58 AM






Hi,

I am a newbie in SQL server 2008. It is difficult for me to change
the hostname of SQL server 2008. In internet, I found the script
execute in SQL server 2008.

sp_dropserver <old_name>
GO
sp_addserver <new_name>, local
GO

However, the username of SQL server 2008 is under <old_name\user1>
<old_name\administrator>...... Who can tell me the things have to do
when hostname of SQL server 2008 changed? Thank you.

Ming

Reply With Quote
  #2  
Old   
Rick Byham, MSFT
 
Posts: n/a

Default Re: What things have to do when hostname of SQL server 2008 change? - 05-06-2010 , 05:49 PM






I'm not sure why you mention the user name. Changing the host name (that is
the name of the computer) isn't related to the name of the account used by
the Database Engine service.
When connected to SQL Server, execute SELECT @@SERVERNAME
That will return the name that SQL Server thinks it is.
--
Rick Byham, MSFT
(Implies no warranty or rights)


"Ming?" <leo (AT) tech-trans (DOT) com> wrote

Quote:
Hi,

I am a newbie in SQL server 2008. It is difficult for me to change
the hostname of SQL server 2008. In internet, I found the script
execute in SQL server 2008.

sp_dropserver <old_name
GO
sp_addserver <new_name>, local
GO

However, the username of SQL server 2008 is under <old_name\user1
old_name\administrator>...... Who can tell me the things have to do
when hostname of SQL server 2008 changed? Thank you.

Ming

Reply With Quote
  #3  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: What things have to do when hostname of SQL server 2008 change? - 05-07-2010 , 02:11 AM



Rick Byham, MSFT (rickbyh (AT) microsoft (DOT) com) writes:
Quote:
I'm not sure why you mention the user name. Changing the host name (that
is the name of the computer) isn't related to the name of the account
used by the Database Engine service. When connected to SQL Server,
execute SELECT @@SERVERNAME
That will return the name that SQL Server thinks it is.
The way I understood Ming's question is that he as a machine, call it
ABC. When he installed SQL Server, he specifed that ABC\MING should
have sysadpowers. He also has ABC\User1, ABC\User2 etc.

He now wants to rename machine to be called XYZ, and he wonders what will
happen with the usernames. I started to compose a reply last night, but
I since I don't really know what happens in this case, I decided to not
post anything that could be bad advice.

Ming, it could help if you could confirm, if I have understood your
situation correctly.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.