已暫停某 State Service 應用程式的所有 State Service 資料庫 (SharePoint Server)All State Service databases are paused for a State Service Application (SharePoint Server)

摘要:了解如何解決 SharePoint Health Analyzer 規則「已針對某個 State Service 應用程式暫停所有 State Service 資料庫」。Summary: Learn how to resolve the SharePoint Health Analyzer rule "All State Service databases are paused for a State Service Application."

規則名稱: 已針對某個 State Service 應用程式暫停所有 State Service 資料庫Rule Name: All State Service databases are paused for a State Service Application

摘要: 已暫停與某個 State Service 服務應用程式相關聯的所有資料庫,可能導致使用 InfoPath 網頁瀏覽器表單和 Microsoft SharePoint 圖表網頁組件等一些 SharePoint Server 2016 和 SharePoint 2013 元件時發生錯誤。Summary: All of the databases associated with a State Service service application are paused. This may result in errors when using some SharePoint Server 2016 and SharePoint 2013 components such as InfoPath Web browser forms and the Microsoft SharePoint Chart Web Part.

原因: 這可能是管理員暫停服務應用程式的所有資料庫所造成。Cause: This might be caused by the administrator pausing all databases for the service application.

解決方案: 使用 Microsoft PowerShell 恢復「狀態服務」的服務應用程式資料庫Resolution: Resume the State Service service application databases by using Microsoft PowerShell

  1. 確認您具備下列成員身分:Verify that you have the following memberships:

    • SQL Server 執行個體上的 securityadmin 固定伺服器角色。securityadmin fixed server role on the SQL Server instance.

    • 所有要更新之資料庫上的 db_owner 固定資料庫角色。db_owner fixed database role on all databases that are to be updated.

    • 正在執行 PowerShell Cmdlet 之所在伺服器上的系統管理員群組。Administrators group on the server on which you are running the PowerShell cmdlets.

      系統管理員可以使用 Add-SPShellAdmin Cmdlet 授與使用 SharePoint Server Cmdlet 的權限。An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server cmdlets.

      注意

      如果您不具備上述權限,請連絡安裝程式系統管理員或 SQL Server 系統管理員要求權限。如需 PowerShell 權限的其他資訊,請參閱 Add-SPShellAdminIf you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about PowerShell permissions, see Add-SPShellAdmin.

  2. 啟動 SharePoint 管理命令介面。Start the SharePoint Management Shell.

    如需如何與 Windows Server 2012 R2 互動的詳細資訊,請參閱<Windows 的常見管理工作及瀏覽方式>。For more information about how to interact with Windows Server 2012 R2, see Common Management Tasks and Navigation in Windows.

  3. 若要識別已暫停的資料庫,請在 PowerShell 命令提示字元處輸入下列命令:To identify the paused database, type the following command at the PowerShell command prompt:

    Get-SPStateServiceDatabase
    
  4. 若要繼續已暫停的資料庫,請在 Windows PowerShell 命令提示字元處輸入下列命令:If you want to resume a paused database, type the following command at the Windows PowerShell command prompt:

    Resume-SPStateServiceDatabase -Identity <DatabaseID>
    

    其中:Where:

    • <DatabaseID> 是以 GUID 表示的 State Service 服務應用程式識別碼。<DatabaseID> is the identifier for the State Service service application database as a GUID.
  5. 若要建立新資料庫,而不是使用現有的資料庫,請在 Windows PowerShell 命令提示字元處輸入下列命令:If you want to create a new database instead of using an existing database, type the following command at the Windows PowerShell command prompt:

    New-SPStateServiceDatabase -Name <DatabaseName> -ServiceApplication <ID> -DatabaseServer <ServerName> [-DatabaseCredentials <Credential>] 
    

    其中:Where:

    • <DatabaseName> 是以字串表示的資料庫名稱。<DatabaseName> is name of the database as a string.

    • <ID> 是以字串或 GUID 表示之受影響的 State Service 服務應用程式識別碼。如果只有一個 State Service 服務應用程式,則不需要指定此參數。<ID> is the identifier for the affected State Service service application as a string or a GUID. If there is only one State Service service application, you do not have to specify this parameter.

    • <ServerName> 是資料庫伺服器的名稱。<ServerName> is name of the database server.

    • <Credential> 是資料庫伺服器的 SQL Server 驗證認證。如果未指定此參數,將會使用 Windows 驗證。<Credential> is SQL Server authentication credentials for the database server. If this parameter is not specified, Windows authentication will be used.

如需詳細資訊,請參閱 Resume-SPStateServiceDatabaseNew-SPStateServiceDatabaseFor more information, see Resume-SPStateServiceDatabase or New-SPStateServiceDatabase.