MSSQLSERVER_18483MSSQLSERVER_18483

適用範圍:Applies to: 是SQL ServerSQL Server (所有支援的版本) yesSQL ServerSQL Server (all supported versions) 適用範圍:Applies to: 是SQL ServerSQL Server (所有支援的版本) yesSQL ServerSQL Server (all supported versions)

詳細資料Details

屬性Attribute Value
產品名稱Product Name SQL ServerSQL Server
事件識別碼Event ID 1848318483
事件來源Event Source MSSQLSERVERMSSQLSERVER
元件Component SQLEngineSQLEngine
符號名稱Symbolic Name REMLOGIN_INVALID_USERREMLOGIN_INVALID_USER
訊息文字Message Text 由於未將 '%.ls' 定義為伺服器的遠端登入而無法連接到伺服器 '%. ls'。Could not connect to server '%.ls' because '%.ls' is not defined as a remote login at the server. 請確認您已經指定正確的登入名稱。Verify that you have specified the correct login name. %.*ls。%.*ls.

說明Explanation

當您嘗試在某個系統上設定複寫散發者,而且該系統是使用原本安裝 SQL 執行個體之另一部電腦的硬碟映像所還原時,就會發生此錯誤。This error occurs when you try to configure a replication distributor on a system that was restored using the hard disk image of another computer where the SQL instance was originally installed. 使用者會收到類似下列的錯誤訊息回報:An error message similar to the following is reported to the user:

SQL Server Management Studio 無法將 '<Server><Instance>' 設定為 '<Server><Instance>' 的散發者。SQL Server Management Studio could not configure '<Server><Instance>' as the Distributor for '<Server><Instance>' . 錯誤 18483:無法連接到伺服器 '<Server><Instance>',因為 'distributor_admin' 並未定義為伺服器的遠端登入。Error 18483: Could not connect to server '<Server><Instance>' because 'distributor_admin' is not defined as a remote login at the server. 請確認您已經指定正確的登入名稱。Verify that you have specified the correct login name. %.*ls。%.*ls.

原因Cause

當您從安裝 SQL ServerSQL Server 之另一部電腦的硬碟映像部署 SQL ServerSQL Server 時,會在新安裝中保留已製作映像之電腦的網路名稱。When you deploy SQL ServerSQL Server from a hard disk image of another computer where SQL ServerSQL Server is installed, the network name of the imaged computer is retained in the new installation. 錯誤的網路名稱會導致複寫散發者的設定失敗。The incorrect network name causes the configuration of the replication distributor to fail. 如果您在安裝 SQL ServerSQL Server 之後將電腦重新命名,就會發生相同的問題。The same problem occurs if you rename the computer after SQL ServerSQL Server is installed.

使用者動作User action

若要因應此問題,請以正確的電腦網路名稱取代 SQL ServerSQL Server 伺服器名稱。To work around this problem, replace the SQL ServerSQL Server server name with the correct network name of the computer. 若要這樣做,請依照下列步驟執行:To do so, follow these steps:

  1. 登入您從磁碟映像部署 SQL ServerSQL Server 的電腦,然後在 SSMS 中執行下列 Transact-SQL 陳述式:Log on to the computer where you deployed SQL ServerSQL Server from the disk image, and then run the following Transact-SQL statement in SSMS:

    -- Use the Master database
    USE master
    GO
    
    -- Declare local variables
    DECLARE @serverproperty_servername varchar(100),
    @servername varchar(100);
    
    -- Get the value returned by the SERVERPROPERTY system function
    SELECT @serverproperty_servername = CONVERT(varchar(100), SERVERPROPERTY('ServerName'));
    
    -- Get the value returned by @@SERVERNAME global variable
    SELECT @servername = CONVERT(varchar(100), @@SERVERNAME);
    
    -- Drop the server with incorrect name
    EXEC sp_dropserver @server=@servername;
    
    -- Add the correct server as a local server
    EXEC sp_addserver @server=@serverproperty_servername, @local='local';
    
  2. 將執行 SQL ServerSQL Server 的電腦重新啟動。Restart the computer running SQL ServerSQL Server.

  3. 若要確認 SQL ServerSQL Server 名稱與電腦的網路名稱一樣,請執行下列 Transact-SQL 陳述式:To verify that the SQL ServerSQL Server name and the network name of the computer are the same, run the following Transact-SQL statement:

    SELECT @@SERVERNAME, SERVERPROPERTY('ServerName');
    

詳細資訊More information

您可以使用 SQL ServerSQL Server 中的 @@SERVERNAME 全域變數或 SERVERPROPERTY('ServerName') 函式,來尋找執行 SQL ServerSQL Server 之電腦的網路名稱。You can use the @@SERVERNAME global variable or the SERVERPROPERTY('ServerName') function in SQL ServerSQL Server to find the network name of the computer running SQL ServerSQL Server. 當您重新啟動電腦與 SQL ServerSQL Server 服務時,SERVERPROPERTY 函式的 ServerName 屬性會自動報告電腦網路名稱的變更。The ServerName property of the SERVERPROPERTY function automatically reports the change in the network name of the computer when you restart the computer and the SQL ServerSQL Server service. @@SERVERNAME 全域變數會保留原始的 SQL ServerSQL Server 電腦名稱,直到手動重設 SQL ServerSQL Server 名稱為止。The @@SERVERNAME global variable retains the original SQL ServerSQL Server computer name until the SQL ServerSQL Server name is manually reset.

重現問題的步驟Steps to Reproduce the Problem

在您從磁碟映像部署 SQL ServerSQL Server 的電腦上,依照下列步驟執行:On the computer where you deployed SQL ServerSQL Server from a disk image, follow these steps:

  1. 啟動 Management StudioManagement StudioStart Management StudioManagement Studio.

  2. 在 [物件總管] 中,展開您的 SQL ServerSQL Server 執行個體名稱。In the Object Explorer, expand your SQL ServerSQL Server instance name.

  3. 以滑鼠右鍵按一下 [複寫] 資料夾,然後依序按一下 [設定散發複寫] 與 [設定發行、訂閱者和散發]。Right-click on the Replication folder and click Configure distribution Replication, and then click Configure Publishing, Subscribers, and Distribution.

  4. 在 [設定散發] 組態精靈對話方塊中,按一下 [下一步]。In the Configure Distribution Wizard dialog box, click Next.

  5. 在 [散發者] 對話方塊中,按一下以選取將扮演本身散發者的 [<Server><Instance>];SQL Server 將建立散發資料庫和記錄選項按鈕,然後按一下 [下一步]。In the Distributor dialog box, click to select the '<Server><Instance>' will act as its own Distributor; SQL Server will create a distribution database and log radio button, and then click Next.

  6. 在 [SQL Server Agent 啟動] 對話方塊中,按一下 [下一步]。In the SQL Server Agent Start dialog box, click Next.

  7. 在 [快照集資料夾] 對話方塊中,按一下 [下一步]。In the Snapshot Folder dialog box, click Next.

    注意

    如果您收到確認快照集資料夾路徑的訊息,請按一下 [是]。If you receive a message to confirm the snapshot folder path, click Yes.

  8. 在 [散發資料庫] 對話方塊中,按一下 [下一步]。In the Distribution Database dialog box, click Next.

  9. 在 [發行者] 對話方塊中,按一下 [下一步]。In the Publishers dialog box, click Next.

  10. 在 [精靈動作] 對話方塊中,按一下 [下一步]。In the Wizard Actions dialog box, click Next.

  11. 在 [完成精靈] 對話方塊中,按一下 [完成]。In the Complete the Wizard dialog box, click Finish.

請參閱See also