Вы находитесь на странице: 1из 69

Upgrade - Implement

Sean Livingston
Senior Program Manager
Microsoft

©2012 Microsoft Corporation. All rights reserved.


Upgrade Cycle
Learn
Upgrade methods
New capabilities
Downtime mitigation

Validate Prepare
Troubleshooting Document environment
Upgrade event failures Manage customizations
UI/UX issues Plan upgrade strategy
Data issues Make items upgradable

Implement Test
Build/upgrade farms Build test farms
Deploy customizations Use real data
Minimize downtime Evaluate techniques
Monitor progress Find issues early

©2012 Microsoft Corporation. All rights reserved.


Build SP2013 Farm For
Database Attach Upgrade

©2012 Microsoft Corporation. All rights reserved.


Scripted Environment Setup
 Using PowerShell scripts is recommended way to set
up environment
 Allows repeatability and ensures consistency
 Between test and production environments
 Benefits in disaster recovery situations

 Works as documentation
 Change management is easier if the script always gets updated

©2012 Microsoft Corporation. All rights reserved.


Account Requirements For Upgrades
 Database Upgrades
 Active SQL Server login on the computer that runs SQL Server
 Login must be member of the DB_Owner database security role on the database being upgraded
 Login must be member of the WSS_Admin_WPG database security role on the farm configuration
database
 Member of Farm Admin group
 Service Upgrades
 All requirements above for database upgrade for each database that is part of service being upgraded
 Some services may require additional access such as local Administrator
 Site Collection Upgrades
 Member of Site Collection Administrator group
 Both primary and secondary Site Collection owners have this automatically
 Can also be member of full control web application policy instead
 Farm Upgrades
 Member of the Administrators local group on each server on which upgrade is run

©2012 Microsoft Corporation. All rights reserved.


Implementing Services Upgrade
1. Gather applicable services settings on source farm
2. Backup all applicable services databases from source farm
3. Ensure service application pools are created first
 Make sure the managed account is the correct one for your security needs

4. Create each service application and proxy


 If applicable, upgrade service database during service application creation
 Pay special attention to differences in some services
 Most service upgrade processes are the same, some are different though

5. Start service instances only after service is created with


upgraded databases
©2012 Microsoft Corporation. All rights reserved.
Configuring Web Applications
 Before attaching content databases
1. Ensure web applications are setup correctly
 Using correct managed account for application pool
 Correct managed paths exist
 Same AAM zones and URLs are configured
 Solutions and other customizations are installed
2. Ensure service instances are connected to web application
 Some content database upgrades attempt to use service instances
 Service unavailability should not block upgrade
 Service issues during upgrade may require additional work afterwards
 To finish the specific service interaction missed during upgrade
 Check log to look for issues

©2012 Microsoft Corporation. All rights reserved.


Handling Managed Paths
 Should pre-create managed paths before attaching
content databases
 Use the same as was used in prior version if possible

 Otherwise SharePoint will guess based on your content


 SharePoint may create managed paths that don’t work correctly for you
 E.g. Creating managed paths that make explicit inclusions into wildcards if two explicit
exclusions are at same depth under same root
 SharePoint may create different managed paths depending on which database is attached first
 E.g. First content database has sites at depth which makes paths that conflict with sites lower
in depth in second content database

©2012 Microsoft Corporation. All rights reserved.


Handling Alternate Access Mappings
 Must pre-create alternate access mappings before
attaching content databases
 Otherwise SharePoint will only render for default URL

 Use the same as was used in prior version if possible


 Using differing URLs from prior version can cause dirtying of all links
 Will cause link fix-up in background on first hit to each document
 Can cause unnecessary performance hit if URLs shouldn’t change

 Remember to ensure IIS has correct bindings


 If IIS cannot send request to SharePoint, AAM won’t matter
 Should not just modify IIS bindings settings though
 Best practice is to choose correct URL per web application instance
 Configure extended web application instances when required for more zones

©2012 Microsoft Corporation. All rights reserved.


Categories:
• Custom authentication providers
• Existing custom 2010 site definitions into 14 Site Templates
directory

Installing Customizations •


New SP2013 site definitions when available, 2010 if not
New upgrade definition files into 15 Upgrade Config directory
• Existing custom 2010 Features into 14 Features directory
• New custom SP2013 Features into 15 Features directory
1. Install 2010 customizations
 Use 2010 solutions when possible (hopefully • Existing custom 2010 Controls into 14 CustomControls directory
you have these) • New custom SP2013 Controls into 15 CustomControls directory
 Use XCopy when not solution based
• Existing custom 2010 Themes, JS, CSS and images into 14
2. Install SP2013 customizations directories
 Recommend using solutions only • New custom SP2013 Themes, JS, CSS and images into 15
 In some cases, 2010 customization may be directories
used • Existing/new custom resource files into 15 directory
 May defer this if using DSCU
• Existing/replacement custom Web services into 15 directories
3. Make Web.config changes
• Existing/new custom Web part or other assemblies into GAC
 Trusted code entries
 Authentication providers • New custom assembly redirects into 15 directory

©2012 Microsoft Corporation. All rights reserved.


High Availability Multi Farm V2V Upgrades

Build new Upgrade


Switch 2010
SP2013 services and
farm to
service and Upgrade content
Pre-index consume Upgrade site
content federated databases
content upgraded content
farms in services from 2010
federated
parallel with farm to 2013
services
2010 farm

Allows existing Local services in


Use self-
Index cannot be version
● ● ●

Applies to Profile, Search, Social, Leave 2010 farm database in read-only ●
farms to remain upgraded
content farm

Metadata, BCS, Secure Store state to get minimal outage



SP2013 service farm can Service databases set to read- Upgrade copy of services databases
functioning remain as 2010
service
● ●

crawl 2010 content only at SQL to prevent data loss ●


Upgrade copy of content databases
Validate database upgrades
Gives admin Process used internally Search supports a form of sync services for now

● ●

By default leave sites in 14 mode on
Build index before upgrade of

after upgrade

upgrade

valuable test remaining services ●


Allows search admin database to ●
No profile sync ●
2013 content farm
Immediately upgrade only those
be upgraded at pre-index phase
platform before

Search admin database could
Best Bets and Scopes exported
between 2013 and required to be in 15 mode (e.g. PWA)
Validate applicable content upgrades
be upgraded or net new
● ●

going into 2010 instances at


abilities
from 2010, imported into

Switch load balancer to new content

If upgraded, topology must farm
SP2013
production be recreated present

©2012 Microsoft Corporation. All rights reserved.


Core Upgrade
Commands

©2012 Microsoft Corporation. All rights reserved.


Upgrade Related PowerShell Commands
 Content Database • Services
 Mount-SPContentDatabase  New-SPBusinessDataCatalogServiceApplication
 Test-SPContentDatabase
 Restore-SPEnterpriseSearchServiceApplication
 Upgrade-SPContentDatabase
 Upgrade-SPEnterpriseSearchServiceApplication
 Site  Upgrade-SPEnterpriseSearchServiceApplicationSiteSettings
 Test-SPSite  New-SPMetadataServiceApplication
 Repair-SPSite  New-SPPerformancePointServiceApplication
 Upgrade-SPSite  New-SPProfileServiceApplication
 Request-SPUpgradeEvaluationSiteCollection  New-SPProjectServiceApplication
New-New-SPSecureStoreApplication
 Farm

 New-SPSubscriptionSettingsServiceApplication
 Upgrade-SPFarm

 Queue Management
 Get-SPSiteUpgradeSession
 Remove-SPSiteUpgradeSession

©2012 Microsoft Corporation. All rights reserved.


Mount-SPContentDatabase
 Initiates Content Database upgrade
 Runs internal consistency/orphans check
 Runs web application compatibility checks
 Customization references
 Web parts
 Features
 Site Definitions
 Event handlers
 Authentication/security migration references
 Installed to reference auth provider mismatch

©2012 Microsoft Corporation. All rights reserved.


Test-SPContentDatabase
 Finds issues with content databases when compared to a specific
web application
 Can test a database not connected to the farm
 Can test a database already connected to the farm

 List out issues including orphans


 Missing referenced server side customizations:
 Missing Features
 Missing Templates/Site Definitions
 Missing Web Parts
 Site collections in content database but not in the configuration database site map and vice versa

 Use -ShowRowCounts option to find database row sizing metrics

©2012 Microsoft Corporation. All rights reserved.


Upgrade-SPContentDatabase
 Used to upgrade a Content • Can be set to not include child site
Database collections (-NoB2BSiteUpgrade)
 Mainly after applying patches to initiate build to build  Improve B2B database upgrade speed
upgrade  Allows upgrading site collections later
 Can also be used to resume failed version upgrade
after mounting database • Has option to use SQL snapshot if
 Can be used in parallel with other available (-UseSnapshot)
Content Database upgrades  Provides read only copy of content via snapshot
while upgrading writable copy of database behind
the scenes
 Defaults to doing build to build
upgrade on all child site collections
 Does not have option to do version
upgrade of all site collections

©2012 Microsoft Corporation. All rights reserved.


Test-SPSite
 Runs the specified or all site collection health checks in test mode
 Does not do any changes to content when running
 Works for both 14 and 15 mode sites
 Results for test run are used to determine whether site collection
can be upgraded to not
 Errors will prevent upgrade
 All others are to help with troubleshooting after upgrade

 Option to force rerunning recently performed check (-RunAlways)


 Used to bypass result caching if check recently passed

 This command is correlated with Repair-SPSite cmdlet


 Use Repair-SPSite to try to fix some issues found with Test-SPSite

©2012 Microsoft Corporation. All rights reserved.


Repair-SPSite
 Runs the specified or all site collection health checks in repair mode
 Does potentially make changes to content when running
 Works for both 14 and 15 mode sites
 When run, this will create a site level log of the repair operation
 Stored in maintenance library on site
 Maintenance library will be created if it doesn’t exist

 Option to force rerunning recently performed check (-RunAlways)


 Used to bypass result caching if check recently passed

 This command is correlated with Test-SPSite cmdlet

©2012 Microsoft Corporation. All rights reserved.


Upgrade-SPSite
 Used for both build to build and version to version upgrades
 Can initiate an upgrade or resume a failed upgrade

 Defaults to only performing build to build upgrade


 To prevent causing mode switch by accident
 Use -VersionUpgrade option to change from 14 to 15 mode

 Can be used in parallel with other site collection upgrades


 Need to use different PowerShell sessions though

 Has option to add site collection to queue instead of upgrading


within PowerShell process (-QueueOnly)
 Used if you want to add larger numbers of sites to queue and let timer job handle upgrades

 Will initiate upgrade of site collection already in queue


 Only if site is not currently in progress for upgrading

©2012 Microsoft Corporation. All rights reserved.


Request-SPUpgradeEvaluationSiteCollection
 Adds request to create upgrade evaluation copy of specified site
collection
 Request is added to per database queue
 Timer job will process site:
 Snapshot database (Optional)
 Copy site data with new URL and Site ID
 Perform upgrade (Optional)
 Send email (Optional)
 Works even for site collections over self-service request limits

 Has option to not try to immediately upgrade after creating


upgrade evaluation site collection
 Used if trying to make edits to copy before upgrade

 Can send email to site collection admins when creation is finished


©2012 Microsoft Corporation. All rights reserved.
Upgrade-SPFarm
 Used to initiate full farm upgrade on a server
 Intended for initiating build to build upgrades
 Can also be used to resume failed upgrades at farm or for all children
 Replaces using PSConfig based B2B upgrade command
 PSConfig command still works for this, but may be removed in future
versions
 Initiates upgrade at root of upgrade hierarchy
 Will upgrade any child objects that are not yet upgraded
 Can take a long time
 Depending on number of non upgraded objects in heirarchy
 Must be run on each server

©2012 Microsoft Corporation. All rights reserved.


Services Upgrade
Commands

©2012 Microsoft Corporation. All rights reserved.


Service Upgrade Processes
 Common pattern used for most cases:
1. Restore copy of old version service database(s) to SQL
 Can be done using command line or SQL Management Studio
 Following examples use names such as "ManagedMetadata_Upgrade_DB"
2. Create the service application using the new service application cmdlet applicable for that service
type
 Pass in the old database(s) as parameter(s) to the cmdlet
 Will cause upgrade of old version database while creating new service application
3. Create the service application proxy using the new service application cmdlet applicable for that
service type
4. Start the applicable service(s) instance
 Special operations needed for Project, Search, and Secure Store
 Called out accordingly in following slides

©2012 Microsoft Corporation. All rights reserved.


New-SPBusinessDataCatalogServiceApplication

 Creates a new Business Data Connectivity service


application in the farm
 Use to provision new Business Data Connectivity
service instance while passing in an existing database
 Causes upgrade of Business Data Connectivity database as part of creation
 Process works for:
 Version to version database attach upgrade
 Side by side build to build database attach upgrade
 Remember to restore prior version database first

©2012 Microsoft Corporation. All rights reserved.


Example Business Data Catalog Service B2B/V2V Provisioning

$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service


Application"

# Create Business Data Catalog service and proxy


$sa = New-SPBusinessDataCatalogServiceApplication -Name "Business Data Catalog
Service Application" -ApplicationPool $applicationPool -DatabaseName “BDC_Upgrade_DB"
if ($sa) {
New-SPBusinessDataCatalogServiceApplicationProxy -ServiceApplication $sa -Name
"Business Data Catalog Service Application Proxy" -DefaultProxyGroup

#Start Business Data Catalog service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "Business Data Connectivity
Service"} | Start-SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


Restore-SPEnterpriseSearchServiceApplication
 Creates a new Enterprise Search Admin instance in the farm using restored information
 Also known as 3rd party restore process
 Can be used to:
 V2V upgrade an existing Search Admin database
 Side by side B2B upgrade an existing topology including search databases, usage files and
index
 Admin database only
 Only intended for use with V2V upgrades
 Topology must be recreated after restore
 Do no pass in topology file as it will throw and error and prevent restore
 Topology
 Works for B2B upgrades only

©2012 Microsoft Corporation. All rights reserved.


Example Enterprise Search Service V2V Provisioning
$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service
Application"

# Restore Enterprise service and create proxy


$searchInstance = Get-SPEnterpriseSearchServiceInstance -local
$sa = Restore-SPEnterpriseSearchServiceApplication -Name "Search Service Application"
-ApplicationPool $applicationPool -AdminSearchServiceInstance $searchInstance
-DatabaseName “SearchAdmin_Upgrade_DB"
if ($sa) {
New-SPEnterpriseSearchServiceApplicationProxy -ServiceApplication $sa -Name
“Search Service Application Proxy“ -Uri $sa.Uri.AbsoluteURI

#Start Enterprise Search service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "Search Server Service"} |
Start-SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


Export-SPEnterpriseSearchTopology
 Exports the existing topology to an XML file
 File contains information on service names, locations, and databases

 Topology file can be used to restore service instance across


same version farms
 Must be accompanied by other referenced files and databases though

 2010 topology file cannot be used with 2013


 2010 and 2013 topology XML files use different XML Name Spaces
 Only Search Admin 2010 database can be upgraded across versions so using the same file is of
little value

©2012 Microsoft Corporation. All rights reserved.


Example Enterprise Search Service B2B Provisioning
# On prior farm, get search topology
$ssa = Get-SPEnterpriseSearchServiceApplication
Export-SPEnterpriseSearchTopology -SearchApplication $ssa -Filename "Topology_File.xml"

# On new farm, provision Enterprise Search using topology file


$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service Application"

# Restore Enterprise Search service and create proxy


$sa = Restore-SPEnterpriseSearchServiceApplication -Name "Search Service Application"
-ApplicationPool $applicationPool -Topology "Topology_File.xml"
if ($sa) {
New-SPEnterpriseSearchServiceApplicationProxy -ServiceApplication $sa -Name "Search Service
Application Proxy" -Uri $sa.Uri.AbsoluteURI

#Start Enterprise Search service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "SharePoint Server Search"} | Start-
SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


Upgrade-SPEnterpriseSearchServiceApplication

 Upgrades an existing search service application


 Used specifically for build to build upgrades
 Use if only search has backwards compatibility breaking change
 Most likely after any service pack level change
 Could occur at any CU or QFE, check release notes and/or test first to confirm
need
 Mainly used to avoid doing full farm upgrade immediately after patching
 If only search needs upgrade, then this will be much faster

©2012 Microsoft Corporation. All rights reserved.


Upgrade-SPEnterpriseSearchServiceApplicationSiteSettings

 Upgrades the search related settings on a given site


collection
 Used specifically for build to build upgrades

©2012 Microsoft Corporation. All rights reserved.


New-SPMetadataServiceApplication
 Creates a new Managed Metadata service
application in the farm
 Use to provision new Managed Metadata service
instance while passing in an existing database
 Causes upgrade of Managed Metadata database as part of creation
 Process works for:
 Version to version database attach upgrade
 Side by side build to build database attach upgrade
 Remember to restore prior version database first

©2012 Microsoft Corporation. All rights reserved.


Example Of Managed Metadata Service Provisioning
$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service
Application"

# Create Managed Metadata service and proxy


$sa = New-SPMetadataServiceApplication -Name "Managed Metadata Service Application"
-ApplicationPool $applicationPool -DatabaseName "ManagedMetadata_Upgrade_DB"
if ($sa) {
New-SPMetadataServiceApplicationProxy -ServiceApplication $sa -Name "Managed
Metadata Service Application Proxy" -DefaultProxyGroup

#Start Managed Metadata service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "Managed Metadata Web
Service"} | Start-SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


New-SPPerformancePointServiceApplication
 Creates a PerformancePoint service application in the
farm
 Use to provision new PerformancePoint service
instance while passing in an existing database
 Causes upgrade of PerformancePoint database as part of creation
 Process works for:
 Version to version database attach upgrade
 Side by side build to build database attach upgrade
 Remember to restore prior version database first

©2012 Microsoft Corporation. All rights reserved.


Example Of PerformancePoint Service Provisioning
$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service
Application"

# Create PerformancePoint service and proxy


$sa = New-SPPerformancePointServiceApplication -Name "PerformancePoint Service
Application" -ApplicationPool $applicationPool -DatabaseName
"PerformancePoint_Upgrade_DB"
if ($sa) {
New-SPPerformancePointServiceApplicationProxy -ServiceApplication $sa -Name
"PerformancePoint Service Application Proxy" -DefaultProxyGroup

#Start PerformancePoint service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "PerformancePoint Service"}
| Start-SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


New-SPProfileServiceApplication
 Adds a User Profile Service application to a farm
 Use to provision new User Profile service instance
while passing in existing databases
 Causes upgrade of both Profile and Social databases as part of creation
 Process works for:
 Version to version database attach upgrade
 Side by side build to build database attach upgrade
 Remember to restore both prior version databases first

©2012 Microsoft Corporation. All rights reserved.


Example Profile Service B2B/V2V Provisioning
$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service
Application"

# Create User Profile service and proxy


$sa = New-SPProfileServiceApplication -Name "User Profile Service Application"
-ApplicationPool $applicationPool -ProfileDBName "UPA_Profile_Upgrade_DB"
-SocialDBName "UPA_Social_Upgrade_DB"
if ($sa) {
New-SPProfileServiceApplicationProxy -ServiceApplication $sa -Name "User Profile
Service Application Proxy" -DefaultProxyGroup

#Start User Profile service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "User Profile Service"} |
Start-SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


Mount-SPProjectDatabase
 Use to mount single merged Project database or to merge
all four prior version Project databases into one and mount
it to farm
 Calls ConvertTo-SPProjectDatabase only if four other databases are passed in

 Causes upgrade of merged Project database


 Process works for:
 Version to version database attach upgrade
 Merged database is attached to Project service instance
 Side by side build to build database attach upgrade
 Performs upgrade as part of attachment process
 Remember to restore prior version databases first

©2012 Microsoft Corporation. All rights reserved.


ConvertTo-SPProjectDatabase
 Use to merge all four prior version Project databases into
one
 Merged Project Database = 2010 Draft Database + 2010 Published Database + 2010 Archived
Database + 2010 Reporting Database
 Only used for version to version upgrade case
 Recommended to use Mount-SPProjectDatabase instead
of this command
 This will get called behind the scenes to merge the databases

 Merged database is attached to Project service instance


 Database is upgraded as part of attachment process

©2012 Microsoft Corporation. All rights reserved.


Example Project Service V2V Provisioning
$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service
Application“

# Create Project service and proxy


$sa = New-SPProjectServiceApplication -Name "Project Service Application"
-ApplicationPool $applicationPool –Proxy $true
if ($sa) {
# Merge, mount and upgrade existing project databases
Mount-SPProjectDatabase -ServiceApplication $sa -ProjectServiceDbname
"Merged_Project_DB" -DraftDBName "Project_Draft_DB" -PublishedDBName
"Project_Published_DB" -ArchiveDBName "Project_Archived_DB" -ReportingDBName
"Project_Reporting_DB"

#Start Project service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "Project Server Application
Service"} | Start-SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


Upgrade-SPProjectWebInstance
 Upgrades an existing Project Service application in
the farm
 Used specifically for build to build upgrades
 Use if only the project service has backwards compatibility breaking change
 Most likely after any service pack level change
 Could occur at any CU or QFE, check release notes and/or test first to confirm
need
 Mainly used to avoid doing full farm upgrade immediately after patching
 If only project needs upgrade, then this will be much faster

©2012 Microsoft Corporation. All rights reserved.


Upgrade-SPProjectDatabase
 Upgrades an existing Project database in the farm
 Used specifically for build to build upgrades
 Use if only project database has backwards compatibility breaking change
 Most likely after any service pack level change
 Could occur at any CU or QFE, check release notes and/or test first to confirm
need
 Mainly used to avoid doing full farm upgrade immediately after patching
 If only a project database needs upgrade, then this will be much faster

©2012 Microsoft Corporation. All rights reserved.


New-SPSecureStoreApplication
 Creates a new Secure Store Service application in the farm
 Use to provision new Secure Store service instance while
passing in an existing database
 Causes upgrade of Secure Store database as part of creation
 Process works for:
 Version to version database attach upgrade
 Side by side build to build database attach upgrade
 Remember to restore prior version database first

 Need to set the service passphrase to same as pre-upgrade


 Otherwise service will work but application passwords will be lost

©2012 Microsoft Corporation. All rights reserved.


Example Secure Store Service B2B/V2V Provisioning
$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service Application"

# Create Secure Store service and proxy


$sa = New-SPSecureStoreServiceApplication -Name "SecureStore Service Application"
-ApplicationPool $applicationPool -DatabaseName "SecureStore_Upgrade_DB" –AuditingEnabled
if ($sa) {
$proxy = New-SPSecureStoreServiceApplicationProxy -ServiceApplication $sa -Name "SecureStore
Service Application Proxy" –DefaultProxygroup}

# Update Secure Store service passphrase to allow use of existing stored passwords
if ($proxy) {Update-SPSecureStoreApplicationServerKey -ServiceApplicationProxy $proxy
-Passphrase "P@ssphrase"}

#Start Secure Store service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "Secure Store Service"} | Start-
SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


New-SPSubscriptionSettingsServiceApplication

 Creates a new Subscription Settings service


application in the farm
 Use to provision new Subscription Settings service
instance while passing in an existing database
 Causes upgrade of Subscription Settings database as part of creation
 Process works for:
 Version to version database attach upgrade
 Side by side build to build database attach upgrade

©2012 Microsoft Corporation. All rights reserved.


Example Subscription Settings Service B2B/V2V Provisioning

$applicationPool = Get-SPServiceApplicationPool -Identity "SharePoint Service


Application"

# Create Subscription Settings service and proxy


$sa = New-SPSubscriptionSettingsServiceApplication -Name "Subscription Settings
Service Application" -ApplicationPool $applicationPool -DatabaseName
"SubscriptionsSettings_Upgrade_DB" –AuditingEnabled
if ($sa) {
$proxy = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $sa
-Name “Subscription Settings Service Application Proxy" –DefaultProxygroup}

#Start Subscription Settings service


Get-SPServiceInstance | Where-Object {$_.TypeName -Eq "Subscription Settings
Service"} | Start-SPServiceInstance
}

©2012 Microsoft Corporation. All rights reserved.


Managing Upgrade
Internals

©2012 Microsoft Corporation. All rights reserved.


Manage Upgrade Queues
 All Site Collection upgrades get listed in the queue
 Each site collection upgrade, whether queued or not, is listed as an SPSiteUpgradeSession

 Add a site to the queue using UI or PowerShell


 Upgrade-SPSite $Site -VersionUpgrade -QueueOnly

 List the queue contents via PowerShell


 Get-SPSiteUpgradeSession -ContentDatabase $ContentDatabase

 Remove a site from the queue using PowerShell


 Remove-SPSiteUpgradeSession $Site

 Upgrade a site in the queue using UI, PowerShell, or timer job


 Upgrade-SPSite $Site -VersionUpgrade
 If in queue, will upgrade using PowerShell session instead
 Upgrade site collections job (job-upgrade-sites)
 Upgrades site collections in a content databases upgrade queue
 Runs every 1 minute

 Manage Content Database and Web Application level upgrade throttle settings
 Remember, upgrade queue is stored per Content Database

©2012 Microsoft Corporation. All rights reserved.


Get-SPSiteUpgradeSession
 Lists upgrade sessions within a content database or the
current state of a specific site collection upgrade
 Defaults to show waiting/queued upgrades
 Defaults to not show in process or completed/failed
upgrades
 Can be used to examine upgrade queue for specific
content database
 If the queue gets stuck on a site collection or backed up due to lots of items
 You’re monitoring upgrade sessions
 You’re just curious about upgrade states

©2012 Microsoft Corporation. All rights reserved.


Remove-SPSiteUpgradeSession
 Removes a site collection from the upgrade queue as long as it is
not currently upgrading
 This can be used to evict a specific upgrade if it turns out to be
blocking other site collection upgrades due to performance
 Normally it would be better to upgrade the site collection in a
different process instead
 Let timer job pick it up, but this could block other queued upgrades until complete
 Works only if site collection is not currently upgrading via another process
 Pick up the queued upgrade using PowerShell by specifying the site collection
 Works only if site collection is not currently upgrading via another process

©2012 Microsoft Corporation. All rights reserved.


Upgrade Throttle Settings
 Content Database upgrade throttle settings
 SPContentDatabase.ConcurrentSiteUpgradeSessionLimit
 Maximum number of concurrent site collection upgrades that can occur against the content database
at once. If exceeded the upgrade is queued.
 Web Application upgrade throttle settings
 Found within SPWebApplication.SiteUpgradeThrottleSettings
 AppPoolConcurrentUpgradeSessionLimit
 Maximum number of concurrent site collection upgrades that can occur within the web application
process. If exceeded the upgrade is queued.
 UsageStorageLimit
 Maximum size a site collection can be for upgrade to occur within the web application process. If
exceeded the upgrade is queued and occurs in timer job.
 SubwebCountLimit
 Maximum number of subwebs a site collection can have for upgrade to occur within the web
application process. If exceeded the upgrade is queued and occurs in timer job.

©2012 Microsoft Corporation. All rights reserved.


Manage Upgrade Evaluation Settings
 Timer Jobs: • SPWebApplication members:
 AllowSelfServiceUpgradeEvaluation
 Create Upgrade Evaluation Site Collections job  Allows site collection admins to use UI to request
(job-create-upgrade-eval-sites) upgrade evaluation sites
 Creates upgrade evaluation site collections  Defaults to true
 SendSiteUpgradeEmails
 Runs daily between 01:00:00 and 01:30:00
 Sends email to all site collection admins when upgrade
 Delete Upgrade Evaluation Site Collections job evaluation site is requested and later created
(job-delete-upgrade-eval-sites)  Defaults to true
 Deletes upgrade evaluation site collections  MaxSizeForSelfServiceEvalSiteCreationMB
 Sets maximum possible size of site collection that site
which are past their expiry date and sends collection admins can request an upgrade evaluation
notifications to the ones that are near expiry copy of using UI
date
 Runs daily between 01:00:00 and 01:30:00 • SPSite members:
 Upgrade site collections job (job-upgrade-sites)  AllowSelfServiceUpgradeEvaluation
 Upgrades site collections in a content  Allows site collection admins to use UI to request
upgrade evaluation sites
databases upgrade queue  Defaults to not set (inherits form web application)
 Runs every 1 minute  Can be cleared using
InheritAllowSelfServiceUpgradeEvaluationSetting

©2012 Microsoft Corporation. All rights reserved.


Manage Upgrade Notifications
 SPWebApplication.UpgradeMaintenanceLink
 This is used to add an additional link to the upgrading now status message so users can follow it and find out more
information
 It is provided to allow administrators to give further insight into timelines or give contact/escalation information
 Defaults to being empty, so no link appears

 SPWebApplication.UpgradeReminderDelay
 This sets the amount of days a upgrade notification in the status bar will go away after clicking remind me later
 Defaults to 30 days
 If set to 0
 Prevents removing upgrade notification from status bar
 Notification can not be set to remind later

 SPSite.AllowSelfServiceUpgrade
 If set to false, upgrade reminder notification will not show up on that site collection

©2012 Microsoft Corporation. All rights reserved.


Handling Customizations

©2012 Microsoft Corporation. All rights reserved.


Custom Site Definitions
 Upgrade Definition File Based Template Upgrade
Sections
 Applies to all configurations within the ONET.XML
 Configurations will all have the same web and site features activated
 Cannot have different features for different configurations
 Can be used to:
 Deprecate simple features
 Careful with this, it only works for simple features
 Add new Site or Web scoped features
 Move front-end (ghosted) files from one location to another
 Turn existing list instance into Feature based list instance

©2012 Microsoft Corporation. All rights reserved.


Customization Security Changes
 SP2013 no longer supports partial trusted code
solutions
 BIN directory deployment now is full trust
 Existing PTC customizations need to be verified against this change
 Commands now require confirmation to install full trust

©2012 Microsoft Corporation. All rights reserved.


Updating Customizations To Support Both 14
And 15 modes
1. Ensure use of correct layouts directory 4. Get version agnostic setup paths
SPUtility.ContextLayoutsFolder SPUtility.GetGenericSetupPath – obsolete
SPUtility.GetCurrentGenericSetupPath – new
2. Ensure use of correct controltemplates
GetVersionedGenericSetupPath – new
directory
SPUtility.ContextControlTemplatesFolder 5. Use version agnostic resource loading
SPResource.GetVersionedString15
3. Detect and branch on appropriate
SPUtility.GetVersionedLocalizedString15
CompatibilityLevel
LayoutsPageBase.GetVersionedResourceString15
SPSite.CompatibilityLevel
ResourceUtil.GetVersionedResourceString15
SPUtility.ContextCompatibilityLevel

©2012 Microsoft Corporation. All rights reserved.


Example Of CompatibilityLevel Code Branching
if (SPUtility.ContextCompatibilityLevel >=
SPUtility.CompatibilityLevel15)
{
RegisterOnDemand(ctrl, page, ResourceUrls.mQuery_js,
/*localizable*/ false);
RegisterOnDemand(ctrl, page, ResourceUrls.callout_js,
/*localizable*/ false);
}

©2012 Microsoft Corporation. All rights reserved.


Feature Upgrade Code
 Use declarative upgrade actions when possible
 AddContentTypeField
 Adds a content type to the target
 ApplyManifests tag
 Parses and applies new manifest
 Ensure you have this manifest also in the ElementManifests section on the feature
 Otherwise new instances will be different from upgraded ones
 MapFile
 Changes setuppath of files to new path/filename

 Use custom actions to call custom feature receiver when needed


 CustomUpgradeAction tag
 Take care that issues with these could impact/prevent successful upgrade

 Remember to update the feature version number when adding


these
 Otherwise upgrade could have issues

©2012 Microsoft Corporation. All rights reserved.


Example Of Upgrade Code for Features
<UpgradeActions ReceiverAssembly="Contoso.dll, 15.0.0.0, neutral, ad5fe242"
ReceiverClass="Contoso.ModuleUpgradeFeatureReceiver">
<VersionRange EndVersion="15.0.1.0">
<ApplyElementManifests>
<ElementManifest Location="WebParts15.xml"/>
</ApplyElementManifests>
<CustomUpgradeAction Name="DeleteFiles">
<Parameters>
<Parameter Name="FileNames">
_catalogs/wp/Contoso.webpart
</Parameter>
</Parameters>
</CustomUpgradeAction>
</VersionRange>
</UpgradeActions>

©2012 Microsoft Corporation. All rights reserved.


Differences in Solution Deployment
 WSP solutions deployment mechanism updated
 Existing 2010 solutions can be deployed to SP2013
 Supporting 14 mode by default
 Also can install for 15 mode such as for site definitions
 Existing should require no modifications for 14 mode in most cases
 Can require modification if making code decisions on install directory
 More common in MSI installed code than in WSP code
 15 mode may require modifications of payload due to UX issues
 New 2013 solutions can supersede existing ones only when site collection upgrades
 New solutions also need to consider language resource overlap
 2010 solution may lay down resources that 2013 solutions overwrites
 Best deployment practice is to install 2013 solution after 2010 solution
 Best development practice is to have 2013 solution include 2010 resources in .resx files

©2012 Microsoft Corporation. All rights reserved.


Deployment Logic For 14 Solution without -CompatibilityLevel
including 15
IIS Site Web Server Extensions
<Solution SharePointProductVersion=“14”>
14
_admin RootFile Location=“*”
TEMPLATES
RootFile Location=“Templates\*”
_controltemplates CONTROLTEMPLATES
RootFile Location=“Templates\Admin\*”
15 FEATURES
TemplateFile Location=“*”
LAYOUTS
TemplateFile Location=“Admin\*”
_layouts SiteTemplates
TemplateFile Location=“ControlTemplates\*”
15 15 TemplateFile Location=“Features\*”
_vti_adm ADMISAPI TemplateFile Location=“Layouts\*”

_vti_bin ISAPI TemplateFile Location=“SiteTemplates\*”

Resources FeatureManifest
TEMPLATES
SiteDefinitionManifest
admin
App_GlobalSourceFile Location=“*”
CONTROLTEMPLATES

ApplicationResourceFile Location=“*”
FEATURES
ClassResources Location=“*”
LAYOUTS
_wp_resources
SiteTemplates Assembly DeploymentTarget = “WebApplication”
App_GlobalResources
wpresources Assembly DeploymentTarget = “GlobalAssemblyCache”
bin

GAC
</Solution>

©2012 Microsoft Corporation. All rights reserved.


Deployment Logic For 14 Solution with -CompatibilityLevel
including 15
IIS Site Web Server Extensions
<Solution SharePointProductVersion=“14”>
14
_admin RootFile Location=“*”
TEMPLATES
RootFile Location=“Templates\*”
_controltemplates CONTROLTEMPLATES
RootFile Location=“Templates\Admin\*”
15 FEATURES
TemplateFile Location=“*”
LAYOUTS
TemplateFile Location=“Admin\*”
_layouts SiteTemplates
TemplateFile Location=“ControlTemplates\*”
15 15 TemplateFile Location=“Features\*”
_vti_adm ADMISAPI TemplateFile Location=“Layouts\*”

_vti_bin ISAPI TemplateFile Location=“SiteTemplates\*”

Resources FeatureManifest
TEMPLATES
SiteDefinitionManifest
admin
App_GlobalSourceFile Location=“*”
CONTROLTEMPLATES

ApplicationResourceFile Location=“*”
FEATURES
ClassResources Location=“*”
LAYOUTS
_wp_resources
SiteTemplates Assembly DeploymentTarget = “WebApplication”
App_GlobalResources
wpresources Assembly DeploymentTarget = “GlobalAssemblyCache”
bin

GAC
</Solution>

©2012 Microsoft Corporation. All rights reserved.


Deployment Logic For 15 Solution
IIS Site Web Server Extensions
<Solution SharePointProductVersion=“15”>
14
_admin RootFile Location=“*”
TEMPLATES
RootFile Location=“Templates\*”
_controltemplates CONTROLTEMPLATES
RootFile Location=“Templates\Admin\*”
15 FEATURES
TemplateFile Location=“*”
LAYOUTS
TemplateFile Location=“Admin\*”
_layouts SiteTemplates
TemplateFile Location=“ControlTemplates\*”
15 15 TemplateFile Location=“Features\*”
_vti_adm ADMISAPI TemplateFile Location=“Layouts\*”

_vti_bin ISAPI TemplateFile Location=“SiteTemplates\*”

Resources FeatureManifest
TEMPLATES
SiteDefinitionManifest
admin
App_GlobalSourceFile Location=“*”
CONTROLTEMPLATES

ApplicationResourceFile Location=“*”
FEATURES
ClassResources Location=“*”
LAYOUTS
_wp_resources
SiteTemplates Assembly DeploymentTarget = “WebApplication”
App_GlobalResources
wpresources Assembly DeploymentTarget = “GlobalAssemblyCache”
bin

GAC
</Solution>

©2012 Microsoft Corporation. All rights reserved.


Customization Removal Methods
 Feature removals
 Use DeprecateSimpleFeature when applicable
 Use custom code for all other cases

 Web part removals


 Use Web part code to self remove on next use per instance
 Use custom code to find and remove all instances including private ones

 Site Definition removals


 Find and delete all sites using existing site definition, use manual or coded
methods
 Migrate content out of sites first using content export/import or 3 rd party tools

©2012 Microsoft Corporation. All rights reserved.


Customization Replacement Methods
 Feature replacements
 Use existing feature’s upgrade to activate new feature
 Use Site definition upgrade to activate new feature
 Web part replacements
 Use Web part code to add new web part at same location and remove self per instance
 Use custom code to find all public instances and replace
 Does not work for private instances as API cannot show these except for user running code
 Site Definition replacement
 No built in way to do this, use migration instead
 Do not follow misguided suggestions of modifying database to change template ids
 Against support policy and will prevent farm from being supportable

©2012 Microsoft Corporation. All rights reserved.


Feature Removals
 Removing Simple Features • Removing Complex
 Simple features add no artifacts to site,
removal leaves no trace
Features
 CustomActions (NavBar, Ribbon),  Complex features add artifacts to site,
Placeholder removal requires cleanup
 DeprecateSimpleFeature  Event handlers, lists, content types
 Only removes simple features, not  Best to use feature upgrade code to self
complex ones remove instance
 Listed within Upgrade Definition Files  Install 2010 feature in 14 hive, have
upgrade to 15 mode remove instance
 Removes only Feature ID reference from
 Code callout calls deactivate, cleans up
target
 Occurs before rest of feature upgrade
artifacts as applicable
 Be very careful with its use or you could
be in deep trouble
 Feature artifacts without listed feature

©2012 Microsoft Corporation. All rights reserved.


Conclusion

©2012 Microsoft Corporation. All rights reserved.


© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on
the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Вам также может понравиться