Upgrade-SPContentDatabase

 

適用版本: SharePoint Foundation 2010, SharePoint Server 2010

上次修改主題的時間: 2015-03-09

升級內容資料庫。

Syntax

Upgrade-SPContentDatabase [-Identity] <SPContentDatabasePipeBind> [[-ForceDeleteLock] <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-ServerInstance <SPDatabaseServiceInstancePipeBind>] [-UpdateUserExperience <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Upgrade-SPContentDatabase [[-ForceDeleteLock] <SwitchParameter>] -Name <String> -WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-ServerInstance <SPDatabaseServiceInstancePipeBind>] [-UpdateUserExperience <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

詳細描述

此 Cmdlet 包含一個以上的參數集。您可能只使用一個參數集中的參數,但不可以結合不同參數集的參數。如需如何使用參數集的詳細資訊,請參閱 Cmdlet Parameter Sets

Upgrade-SPContentDatabase Cmdlet 會更新 SharePoint 內容資料庫。當執行 Upgrade-SPContentDatabase Cmdlet 時,會起始附加在目前伺服器陣列之現有內容資料庫的升級。此 Cmdlet 會開始進行新的升級工作階段,此工作階段可用於繼續進行失敗的版本對版本、或建置對建置的內容資料庫升級,或開始進行建置對建置的內容資料庫升級。

Parameters

參數 必要 類型 描述

Identity

必要

Microsoft.SharePoint.PowerShell.SPContentDatabasePipeBind

指定要升級的內容資料庫。

此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID 或有效之 SPContentDatabase 物件的執行個體。

ForceDeleteLock

選用

System.Management.Automation.SwitchParameter

在開始升級前,強制刪除資料庫上的鎖定。

Name

必要

System.String

指定附加內容資料庫的名稱。

WebApplication

必要

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

指定主控附加內容資料庫的 Web 應用程式。

AssignmentCollection

選用

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

為能適當處置物件而管理物件。使用 SPWebSPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。使用 SPWebSPSiteSPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。

注意

使用 Global 參數時,所有物件會包含在全域儲存區內。若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。

Confirm

選用

System.Management.Automation.SwitchParameter

執行命令之前,會先提示您進行確認。如需詳細資訊,請輸入下列命令:get-help about_commonparameters

ServerInstance

選用

Microsoft.SharePoint.PowerShell.SPDatabaseServiceInstancePipeBind

主控附加內容資料庫的 SQL Server 執行個體。

UpdateUserExperience

選用

System.Management.Automation.SwitchParameter

判斷內容資料庫是否應該升級到最新的使用者介面。根據預設,使用者介面在升級期間並不會變更。

WhatIf

選用

System.Management.Automation.SwitchParameter

顯示訊息描述命令效果,而非描述命令執行的效果。如需詳細資訊,請輸入下列命令:get-help about_commonparameters

輸入類型

傳回類型

Example

--------------------------範例------------------------------

$contentdb = Get-SPContentDatabase | Where-Object {$_.Name -match "SQLSERVER1\WSS_Content"}

Upgrade-SPContentDatabase -Identity $contentdb

此範例會選取目前附加在伺服器陣列的特定內容資料庫,然後起始升級工作階段。此程序會繼續進行直到升級完成為止,而且可能要花一些時間,視升級時必須進行的變更量而定。

See Also

Reference

Dismount-SPContentDatabase
Get-SPContentDatabase
Mount-SPContentDatabase
New-SPContentDatabase
Remove-SPContentDatabase
Set-SPContentDatabase
Test-SPContentDatabase