Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

1 view
Skip to first unread message

Ming伯

unread,
May 6, 2010, 10:58:54 AM5/6/10
to
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

Rick Byham, MSFT

unread,
May 6, 2010, 6:49:40 PM5/6/10
to
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?" <l...@tech-trans.com> wrote in message
news:1600195a-c367-4710...@j33g2000yqn.googlegroups.com...

Erland Sommarskog

unread,
May 7, 2010, 3:11:10 AM5/7/10
to
Rick Byham, MSFT (ric...@microsoft.com) writes:
> 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, esq...@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0 new messages