Export (0) Print
Expand All

Upgrade-SPContentDatabase

 

Applies to: SharePoint Server 2010, SharePoint Foundation 2010

Topic Last Modified: 2012-02-15

Resumes a failed database upgrade or begins a build to build database upgrade.

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>]]

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.

Use the Upgrade-SPContentDatabase cmdlet to resume a failed database upgrade or begin a build to build database upgrade against a SharePoint content database. When the Upgrade-SPContentDatabase cmdlet is run, an upgrade of an existing content database attached to the current farm is initiated. This cmdlet begins a new upgrade session, which can be used either to resume a failed version-to-version or build-to-build upgrade of a content database or to begin a build-to-build upgrade of a content database.

 

Parameter Required Type Description

Identity

Required

Microsoft.SharePoint.PowerShell.SPContentDatabasePipeBind

Specifies the content database to upgrade.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh or an instance of a valid SPContentDatabase object.

ForceDeleteLock

Optional

System.Management.Automation.SwitchParameter

Forces deletion of locks on the database before the upgrade starts.

Name

Required

System.String

Specifies the name of attached content database.

WebApplication

Required

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

Specifies the Web application that hosts the attached content database.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

noteNote
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

ServerInstance

Optional

Microsoft.SharePoint.PowerShell.SPDatabaseServiceInstancePipeBind

The SQL Server instance that hosts the attached content database.

UpdateUserExperience

Optional

System.Management.Automation.SwitchParameter

Determines whether the content databases should upgrade to the latest user interface. By default, the user interface will not change during upgrade.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

--------------------------EXAMPLE------------------------------

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

This example selects a specific content database that is currently attached to the farm, and then initiates an upgrade session. This process continues until the upgrade is complete and might take some time, depending upon the amount of changes that have to be made during the upgrade.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft