Flyinsky

志在四方,浪迹天涯

导航

Renaming a Server

When you change the name of the computer that is running SQL Server2000, the new name is recognized during SQL Server startup. You do not have to run Setup again to reset the computer name.

You can connect to SQL Server using the new computer name after you have restarted the server. However, to correct the sysservers system table, you should manually run these procedures:

sp_dropserver <old_name>
go
sp_addserver <new_name>
go

今天遇到重命名计算机名称后,SQLServer 运新error 的问题,一查help,
运行 sp_dropserver 和 sp_addserver 可重新命名 SQLServer 名称,
运行后查看 sysservers 中的数据,发现确实更改过来了。再次运行程序,
出现 'server has not been configed for data access' error,
于是调查开始了......
打开 sp_addserver 一看,发现有
execute @retcode = sp_serveroption @server, 'data access', 'off'
这行代码,哈,原来默认把 data access off 掉了,原因知道了,
所以再次运行 sp_serveroption
将 data access 设定为 on , 一切恢复正常,












posted on 2004-07-13 21:28  flyinsky  阅读(362)  评论(0编辑  收藏  举报