Changing the name of your SQL server

本文介绍如何更改已安装SQL Server的服务器名称。首先通过SQL Server Management Studio验证当前服务器名称,然后使用存储过程`sp_dropserver`删除旧名称,并用`sp_addserver`添加新名称。最后重启SQL Server服务确保更改生效。

http://www.zdnetasia.com/changing-the-name-of-your-sql-server-62045446.htm

Have you ever had to change the name of a server that has SQL Server installed on it? If you anwered yes, did you know that you also have to change the name in SQL Server?

Here are the steps to perform the change:

1. Open SQL Server Management Studio and click New Query.

2. Type Select @@ServerName to verify that the server name is correct or incorrect. In this example, I changed the Windows 2003 from WIN2K3R2EE to SQL Server .

I did not change the name in SQL Server 2005. It will still return the old name. Let's fix it.

3. Next, type sp_dropserver ‘WIN2K3R2EE’

4. You are now ready to add the correct name by typing sp_addserver ‘SQLSERVER’. local

5. Restart sql server and the sql server agent by opening a command prompt and typing net stop mssqlserver and net start msssqlserver. To stop and start the sql server agent, type net stop or start sqlserveragent.

6. Click New Query in SQL Server Management Studio and type select @@servername to verify everything is correct and you have successfully changed the sql server name.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值