1. 使用指令查詢確認登錄值跟主機名稱相同:

SELECT CONVERT(varchar(255), SERVERPROPERTY('servername'))
GO;
select @@servername
GO;

select @@servername是查詢登錄值

SERVERPROPERTY('servername') 是傳回主機的名稱

2 如發現兩個傳回的名稱會不同,此時請執行下列的語法進行電腦名稱的修正,之後再請重新啟動服務即可。
先執行

sp_dropserver 'old_name'

再執行:

sp_addserver 'new_name', local

3.如出現:

請停用發行暨散發的功能

參考微軟文件:

https://technet.microsoft.com/zh-tw/library/aa197071(v=sql.80).aspx

 

重點說明:

Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 44

There are still remote logins for the server 'SERVER1'.

To resolve the error, you may need to drop remote logins for this server. If replication is installed, disable replication on the server before running the sp_dropserver stored procedure.

To disable replication using the SQL Server Enterprise Manager

  1. Expand a server group, and then expand the Distributor (the server that contains the distribution database).
  2. Right-click the Replication folder, and then click Disable Publishing.
  3. Complete the steps in the Disable Publishing and Distribution Wizard.
arrow
arrow

    蜻蜓的資訊小園地 發表在 痞客邦 留言(0) 人氣()