Copy databases to the new farm for upgrade to SharePoint 2013

適用于:yes-img-132013 no-img-16 2016no-img-192019 no-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

當您從 SharePoint 2010 產品升級至 SharePoint 2013,必須使用資料庫附加升級,意即您只升級環境內容,不升級組態設定。 設定新的 SharePoint 2013 環境之後,您可以將內容和服務應用程式資料庫從 SharePoint 2010 產品環境複製到 SharePoint 2013 環境。 您可以使用備份和還原程式來複製資料庫,也可以選擇在 SharePoint 2010 產品環境中將資料庫設定為唯讀,讓使用者可以繼續存取其資訊,但不能變更它。 本文包含您複製資料庫所要採取的步驟。

升級程序階段 2:將資料庫複製到新的伺服器陣列

SharePoint 2013 升級程序的各個階段

   
123 步驟 這是將 SharePoint 2010 產品資料和網站升級至 SharePoint 2013 程式的第二個階段。 程序中包含必須依序完成的下列階段:
建立資料庫的 SharePoint 2013 伺服器陣列,將 upgradeCopy 資料庫附加至新的伺服器陣列,以升級至 SharePoint 2013 (此階段) 將服務應用程式升級至 SharePoint 2013 將內容資料庫從 SharePoint 2010 升級至 SharePoint 2013 將網站集合升級至 SharePoint 2013 如需整個程式的概觀, 請參閱 從 SharePoint 2010 升級至 SharePoint 2013 的升級程式概觀 和升級程式模型 下載升級程式模型

重要事項

雖然本文同時適用于 SharePoint Foundation 2013 和 SharePoint 2013,但有關如何備份和還原服務應用程式資料庫的章節僅適用于 SharePoint 2013。 (例外狀況是適用于 SharePoint Foundation 2013 和 SharePoint 2013) 之 Business Data Connectivity Service 應用程式的相關章節。

觀賞 SharePoint 2013 升級:階段 2 影片

開始之前

複製資料庫之前,請檢閱下列資訊,並採取建議的動作。

  • 請確定您用來複製資料庫的帳戶可以存取 SharePoint 2010 產品和 SharePoint 2013 環境中的SQL Server Management Studio,並可存取可從這兩個環境存取的網路位置,以儲存資料庫的複本。

  • 請確定將資料庫設為唯讀和讀寫所用帳戶,為所有要升級之內容資料庫的 db_owner 固定資料庫角色成員。

  • 備份資料庫之前,請先檢查及修復所有資料庫一致性錯誤。

  • 請確定您的 2010 環境已經套用適當的 Service Pack 或更新。 如果您在環境中使用遠端部落格儲存 (RBS),您必須先在環境中執行 SharePoint 2010 產品的 Service Pack 1,然後再啟動升級程序。

將舊版資料庫設為唯讀

若要維護使用者對原始環境的存取權,請在備份資料庫之前,將 SharePoint 2010 Products 資料庫設定為唯讀。 即使您不想要長期維持存取權,請將資料庫設定為唯讀,以確保您擷取備份中的所有資料,以便在不允許進行其他變更的情況下還原和升級環境的目前狀態。 如果資料庫設定為唯讀,使用者可以繼續檢視內容。 不過,他們將無法新增或變更內容。

重要事項

在 SharePoint 2010 產品環境中執行此步驟。

使用 SQL Server 工具將資料庫設為唯讀

  1. 確認執行此程序的使用者帳戶為 db_owner 固定資料庫角色的成員。

  2. In SQL Server Management Studio, in Object Explorer, connect to an instance of the Database Engine, expand the server, and then expand Databases.

  3. Find the database that you want to configure to be read-only, right-click the database, and then click Properties.

  4. 在 [ 資料庫屬性] 對話方塊的 [ 選取頁面] 區段中,按一下 [ 選項]

  5. In the details pane, under Other options, in the State section, next to Database Read-Only, click the arrow, and then select True.

您可以使用 Transact-SQL,設定 READ_ONLY 資料庫可用性選項。 如需如何使用 ALTER DATABASE 陳述式之 SET 子句的詳細資訊,請參閱< 設定資料庫選項>。

使用SQL Server工具備份 SharePoint 2010 Products 資料庫

備份 SQL Server Management Studio 的資料庫。 若您必須重新啟用原始伺服器陣列,且必須進行資料庫附加升級,資料庫的備份複本可保證您的資料安全無虞。 在 SharePoint 2010 Products 伺服器陣列中重複下列資料庫的程式:

  • 所有內容資料庫 (預設資料庫名稱:WSS_Content_ID

  • 下列服務應用程式資料庫:

服務應用程式 預設資料庫名稱
Business Data Connectivity BDC_Service_DB_ID
受管理的中繼資料 Managed Metadata Service_ID
PerformancePoint PerformancePoint Service Application_識別碼
搜尋管理 Search_Service_Application_DB_ID
Secure Store Secure_Store_Service_DB_ID
使用者設定檔:設定檔、社交及同步處理資料庫 User Profile Service Application_ProfileDB_*ID_
User Profile Service Application_SocialDB_*ID_
User Profile Service 應用程式同步處理資料庫識別碼

注意事項

商務資料聯機服務應用程式可在 SharePoint Foundation 2010 和 SharePoint Server 2010 中使用。 其他服務應用程式僅適用于 SharePoint Server 2010。 雖然 SharePoint Foundation 2010 包含搜尋功能,但它與 SharePoint Server 2010 中的搜尋服務應用程式不同,因此無法升級。

您不需要備份設定或系統管理內容資料庫,因為當您設定 SharePoint 2013 伺服器陣列時,會重新建立這些資料庫。 不支援升級組態或管理內容資料庫以及管理中心網站集合。

完成此程序後,即建立了唯讀內容資料庫備份。

重要事項

在 SharePoint 2010 產品環境中執行此步驟。

使用 SQL Server 工具備份資料庫

  1. 確認執行此程序的使用者帳戶為 db_owner 固定資料庫角色的成員。

  2. In Management Studio, in Object Explorer, connect to an instance of the Database Engine, expand the server, and then expand Databases.

  3. Right-click the database that you want to back up, point to Tasks, and then click Back Up.

    [ 備份資料庫] 對話方塊隨即出現。

  4. In the Source area, in the Database box, verify the database name.

  5. In the Backup type box, select Full.

  6. Under Backup component, select Database.

  7. In the Backup set area, in the Name box, either accept the backup set name that is suggested or type a different name for the backup set.

  8. In the Destination area, specify the type of backup destination by selecting Disk or Tape, and then specify a destination. To create a different destination, click Add.

  9. Click OK to start the backup process.

重複上述程式,以備份 SharePoint 2010 Products 在環境中使用的所有內容和適當的服務應用程式資料庫。

重要事項

您必須先停止 SharePoint Server 2010 伺服器陣列上的搜尋服務,才能備份搜尋服務應用程式管理資料庫。 若要停止搜尋服務,請在原始伺服器陣列的 [開始] 功能表上,按一下 [系統管理工具],然後按一下 [服務]。 以滑鼠右鍵按一下 [SharePoint Server 搜尋 14],然後按一下 [ 停止]。 備份資料庫之後,請務必再次啟動服務。

將備份檔案複製到 SharePoint 2013 環境

將您在上一個程式中建立的備份檔案從 SharePoint 2010 產品環境複製到 SharePoint 2013 環境。

還原資料庫的備份複本

設定新的 SharePoint 2013 伺服器陣列之後,您可以將資料庫的備份複本還原到SQL Server。 請先從一個資料庫開始,確認還原作業一切正常,然後再還原其他資料庫。

重要事項

[!重要事項] 請務必保留原始備份複本,以防升級失敗,且必須疑難排解並重試。 > 在 SharePoint 2013 環境中執行此步驟。

使用 SQL Server 工具還原資料庫的備份複本

  1. 確認執行此程序的使用者帳戶為 db_owner 固定資料庫角色的成員。

  2. 連線至適當的 SQL Server 2008 Database Engine 執行個體之後,請在 [物件總管] 中,展開伺服器名稱。

  3. 以滑鼠右鍵按一下 [資料庫],然後按 [還原資料庫]

    [ 還原資料庫] 對話方塊隨即出現。

  4. 在 [ 還原資料庫 ] 對話方塊的 [ 一般 ] 頁面上,于 [至資料庫] 清單中輸入要還原的 資料庫 名稱。

    提示

    [!提示] 當您輸入還原資料庫的名稱時,不需要使用原始名稱。 若要將資料庫名稱從包含冗長 GUID 的名稱改為好記的名稱,此時就能變更。 請務必也變更檔案系統 (MDF 與 LDF 檔案) 的資料庫及記錄檔名稱,如此名稱才會相符。

  5. In the To a point in time text box, keep the default (Most recent possible).

  6. To specify the source and location of the backup sets to restore, click From device, and then use the ellipsis ( ...) to select the backup file.

  7. 在 [ 指定備份] 對話方塊的 [ 備份媒體 ] 方塊中,確定已選取 [檔案 ]。

  8. In the Backup location area, click Add.

  9. 在 [ 尋找備份檔案] 對話方塊中,選取您要還原的檔案,按一下 [ 確定],然後在 [ 指定備份 ] 對話方塊中,按一下 [ 確定]

  10. 在 [還原資料庫] 對話方塊的 [選取要還原的備份組] 方格底下,選取最近一次完整備份旁的 [還原] 核取方塊。

  11. 在 [ 還原資料庫 ] 對話方塊的 [ 選項] 頁面上,選取 [ 還原選項] 底下的 [ 覆寫現有的資料庫 ] 核取方塊。

  12. Click OK to start the restore process.

將資料庫設為讀寫。

您無法升級已設成唯讀的資料庫。 您必須先將 SharePoint 2013 伺服器陣列上的資料庫設回讀寫,才能附加並升級它們。

重要事項

在 SharePoint 2013 環境中執行此步驟。

使用 SQL Server 工具將資料庫設為讀寫

  1. In SQL Server Management Studio, in Object Explorer, connect to an instance of the Database Engine, expand the server, and then expand Databases.

  2. Select the database that you want to configure to be read-write, right-click the database, and then click Properties.

  3. 在 [ 資料庫屬性] 對話方塊的 [ 選取頁面] 區段中,按一下 [ 選項]

  4. In the details pane, under Other options, in the State section, next to Database Read-Only, click the arrow, and then select False.

   
123 步驟 這是將 SharePoint 2010 產品資料和網站升級至 SharePoint 2013 程式的第二個階段。
下一個階段: 將服務應用程式升級至 SharePoint 2013
如需整個程式的概觀,請參閱 從 SharePoint 2010 升級至 SharePoint 2013 的程式概觀

另請參閱

其他資源

Checklist for database-attach upgrade (SharePoint 2013)

將共用服務的伺服器陣列 (父項及子項伺服器陣列) 升級至 SharePoint 2013

測試及疑難排解升級到 SharePoint 2013 的問題