时间:2021-07-01 10:21:17 帮助过:35人阅读
DECLARE @sn sysname,@sno sysname; SELECT @sn=cast(serverproperty('servername') as sysname),@sno=@@SERVERNAME; IF @sno IS NULL BEGIN EXEC sp_addserver @server=@sn,@local = 'local'; SELECT N'Finish the server name to revise, and has already stopped serving, please restart the server'; SELECT N'完成伺服器名