Export (0) Print
Expand All

Upgrade-SPContentDatabase

 

Applies to: SharePoint Server 2013 Enterprise, SharePoint Foundation 2013

Topic Last Modified: 2013-12-18

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

Upgrade-SPContentDatabase [-Identity] <SPContentDatabasePipeBind> [[-ForceDeleteLock] <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-NoB2BSiteUpgrade <SwitchParameter>] [-ServerInstance <SPDatabaseServiceInstancePipeBind>] [-SkipIntegrityChecks <SwitchParameter>] [-UseSnapshot <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Upgrade-SPContentDatabase [[-ForceDeleteLock] <SwitchParameter>] -Name <String> -WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-NoB2BSiteUpgrade <SwitchParameter>] [-ServerInstance <SPDatabaseServiceInstancePipeBind>] [-SkipIntegrityChecks <SwitchParameter>] [-UseSnapshot <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. The Upgrade-SPContentDatabase cmdlet initiates an upgrade of an existing content database that is attached to the current farm. 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.

If the database is hosted on a version of SQL Server that supports creation and use of snapshots of the database, this cmdlet can use a database snapshot for build-to-build upgrades. During upgrade, users see a ready-only version of the database, which is the snapshot. After upgrade users see upgraded content.

The default behavior of this cmdlet causes an upgrade of the schema of the database and initiates build-to-build upgrades for all site collections within the specified content database if required. To prevent build-to-build upgrades of site collections, use the NoB2BSiteUpgrade parameter. This cmdlet does not trigger version-to-version upgrade of any site collections.

 

Parameter Required Type Description

Identity

Required

Microsoft.SharePoint.PowerShell.SPContentDatabasePipeBind

Specifies the content database to upgrade.

The value 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

NoB2BSiteUpgrade

Optional

System.Management.Automation.SwitchParameter

Specifies to not upgrade all child objects when performing a build-to-build upgrade.

ServerInstance

Optional

Microsoft.SharePoint.PowerShell.SPDatabaseServiceInstancePipeBind

The SQL Server instance that hosts the attached content database.

SkipIntegrityChecks

Optional

System.Management.Automation.SwitchParameter

Specifies the upgrade process not to run the internal integrity checks such as missing templates, and orphan detection as part of the upgrade process.

UseSnapshot

Optional

System.Management.Automation.SwitchParameter

Specifies to use the snapshot method to perform unattached upgrade. This will make a snapshot of the current database and then perform all upgrade operations that apply to the database, and optionally to its contents.

The existing connections to the content database will be set to use the snapshot for the duration of the upgrade, and then switched back after successful completion of upgrade. A failed upgrade reverts the database to its state when the snapshot was taken.

This parameter only works for versions of SQL Server that support creation and use of snapshots, for example, SQL ServerEnterprise edition.

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

Upgrade-SPContentDatabase WSS_Content

This example upgrades the existing WSS_Content content database schema and then performs only build-to-build upgrade actions on existing site collections if required. This operation does not changed the CompatibilityLevel for existing site collections in this database.

--------------------------EXAMPLE 2------------------------------

Upgrade-SPContentDatabase WSS_Content -NoB2BSiteUpgrade

This example upgrades the existing WSS_Content content database schema only. No build-to-build upgrade actions are performed on any site collections. This operation does not change The CompatibilityLevel for existing site collections in this database.

--------------------------EXAMPLE 3------------------------------

Upgrade-SPContentDatabase WSS_Content -NoB2BSiteUpgrade -UseSnapshot

This example upgrades the existing WSS_Content content database schema only while using a snapshot of the database to retain read-only access to the content during the upgrade. No build-to-build upgrade actions are performed on any site collections. This operation does not change the CompatibilityLevel for existing site collections in this database.

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