1.電腦先變更完電腦名稱
2.開啟Management Studio查詢,應該2個名稱會不一樣
==========================================================
SELECT CONVERT(varchar(255), SERVERPROPERTY('servername'))
GO;
select @@servername
GO;
==========================================================
3.再墊行下面這段,跑完sql會停掉,視窗應該要到服務去重啟sql,原本的視
==========================================================
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
'完成伺服器名稱修改,並已停止服務,請重新啟動伺服器'
;
SHUTDOWN
WITH
NOWAIT;
RETURN
;
END
ELSE
IF (@sn=@sno)
BEGIN
SELECT
N
'Do not need to revise the server name'
;
SELECT
N
'無須修正伺服器名稱'
;
RETURN
;
END
ELSE
BEGIN
EXEC
sp_dropserver @sno;
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
'完成伺服器名稱修改,並已停止服務,請重新啟動伺服器'
;
SHUTDOWN
WITH
NOWAIT;
END
4.改Reporting Services 組態管理員
資料庫 > 變更資料庫 > 選現有資料庫 > 改電腦名稱,下一步下一步直到存檔
報表資料庫 : ReporServer\SQLEXPRESS
報表伺服器模式 : 原生
驗証類型 : 服務帳戶
沒有留言:
張貼留言