在 SharePoint Server 中將內容移入或移出 RBSMigrate content into or out of RBS in SharePoint Server

摘要:了解如何在遠端 BLOB 儲存 (RBS) 中移轉內容或從中移轉出內容,或將內容移轉至 SharePoint Server 2016 和 SharePoint 2013 的其他 RBS 提供者。Summary: Learn how to migrate content into or out of Remote BLOB Storage (RBS), or to a different RBS provider for SharePoint Server 2016 and SharePoint 2013.

安裝 RBS 並將內容資料庫設定為使用 RBS 後,該資料庫中所有現有的內容都可以移轉至資料庫作用中的提供者中。您可以使用同一個 Microsoft PowerShell 命令在 RBS 中移轉內容或從中移轉出內容,或將內容移轉至其他 RBS 提供者。實作 RBS 後,SQL Server 本身會被視為 RBS 提供者。After installing RBS and setting a content database to use RBS, all existing content in that database can be migrated into the database's active provider. You use the same Microsoft PowerShell command to migrate content into or out of RBS, or to another RBS provider. When RBS is implemented, SQL Server itself is regarded as an RBS provider.

您可以隨時移轉內容資料庫,但建議您在低使用率期間執行移轉,此活動才不會導致使用者效能下降。移轉會將指定內容資料庫中所有內容移至新命名提供者的儲存機制中。You can migrate content databases at any time. But we recommend that you perform migrations during low usage periods so that this activity does not cause decrease in performance for users. Migration moves all content from the specified content database into the storage mechanism of the newly named provider.

移轉內容資料庫Migrate a content database

在伺服器陣列中任何的前端或應用程式伺服器上都可以執行此作業。您只需針對想要移轉的每個內容資料庫的前端或應用程式伺服器執行一次此作業。This operation can be performed on any front-end or application server in the farm. You only have to perform the operation one time on one front-end or application server for each content database that you want to migrate.

使用 Microsoft PowerShell 移轉內容資料庫To migrate a content database 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.

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

  3. 在 PowerShell 命令提示字元處,輸入下列步驟中的命令:At the PowerShell command prompt, type the commands in the following steps.

  4. 取得內容資料庫 RBS 設定物件:To obtain the content database RBS settings object:

    $rbs=(Get-SPContentDatabase <ContentDbName>).RemoteBlobStorageSettings
    

    其中 <ContentDbName> 是內容資料庫的名稱。Where <ContentDbName> is the name of the content database.

  5. 檢視網頁伺服器上安裝的 RBS 提供者清單:To view a list the RBS providers installed on the Web server:

    $rbs.GetProviderNames()
    
  6. 設定作用中的 RBS 提供者:To set the active RBS provider:

    $rbs.SetActiveProviderName(<NewProvider>)
    

    其中 <NewProvider> 是要成為此內容資料庫之作用中提供者的名稱。如果要將內容資料庫從 RBS 中完全移轉出來,並遷回 SQL Server 內置儲存區,請將此值設定為 ()Where <NewProvider> is the name of the provider that you want to make active for this content database. If you want to migrate the content database out of RBS completely and back into SQL Server inline storage, set this value to ().

  7. 將資料從 RBS 移轉至新提供者或 SQL Server:Migrate the data from RBS to the new provider or to SQL Server:

    $rbs.Migrate()
    

另請參閱See also

概念Concepts

在 SharePoint Server 中利用 FILESTREAM 設定內容資料庫以使用 RBSSet a content database to use RBS with FILESTREAM in SharePoint Server