SharePoint 2019 Upgrade Part 5: SharePoint 2019 Upgrading Content Databases

SharePoint 2019 Upgrading Content Databases and Site Collections

In this blog post we are going to cover SharePoint 2019 Upgrade. Upgrading Content databases and site collections from SharePoint 2016:
Upgrade Content Databases and Configure Site Collections

Install Custom Solutions

Install all the custom solution(if any) to SharePoint 2019 environment.

Upgrade Default Site Content Database

  1. Save the following PowerShell code in Create-WebApplication.ps1 file.
    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

    $siteName ="SharePoint-2019";
    $siteUrl ="http://sharepoint.brij.com";
    $hostheader =" sharepoint.brij.com ";
    $appPoolName ="SharePoint-AppPool";

    $ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication -DisableKerberos
    $account = Get-SPManagedAccount "Brij\SPFarm"

    New-SPWebApplication -Name $siteName -Port 80 -HostHeader $hostheader -URL $siteUrl -ApplicationPool $appPoolName -ApplicationPoolAccount $account -AuthenticationProvider $ap


  2. Create Web application at port 80 using Create-WebApplication.ps1 PowerShell script.
  3. Create Managed Paths
  4. Remove Content Database
  5. Run PowerShell script to test-content database.
    Test-SPContentDatabase –WebApplication http://sharepoint.brij.com  –Name “SP2019_Main_Content” –DatabaseServer “SP19SQLAlias”
  6. Check the output for missing features and resolve the issues.
  7. Attach the Content database to web application
    Mount-SPContentDatabase –WebApplication http://sharepoint.brij.com –Name “SP2019_Main_Content” –DatabaseServer “SP19SQLAlias”
    If failed, then remove content database, delete database from SQL Server, restore again, Clear SharePoint Timer cache then re-run mount cmdlet.
    On Completion it’ll display 100%
     
  8. Go to Central Admin > Application Management > Change Site Collection Administrators and update Site Collection admin account.
  9. Disable loopback check in registry.
  10. Restart IIS
  11. Try accessing site with url.
  12. If site throws access denied error, then restart the server and try again.

Upgrade MySite

  1. Save the following PowerShell code in Create-MySiteHost.ps1 file.
    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

    $siteName ="MySite-2019";
    $siteUrl ="http://mysite.brij.com";
    $hostheader =" mysite.brij.com ";
    $appPoolName ="MySite-AppPool";

    $ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication -DisableKerberos
    $account = Get-SPManagedAccount "Domain\AppPoolAccount"

    New-SPWebApplication -Name $siteName -Port 80 -HostHeader $hostheader -URL $siteUrl -ApplicationPool $appPoolName -ApplicationPoolAccount $account -AuthenticationProvider $ap


  2. Create Web application at port 80 using Create-MySiteHost.ps1 PowerShell script.
  3. Create Managed Path “Personal”
  4. Remove Content Database
  5. Run PowerShell command to test-content database:
    Test-SPContentDatabase –WebApplication http://mysite.brij.com –Name “SP2019_MySiteHost_Content” –DatabaseServer “SP19SQLAlias”
  6. Check the output for missing features and resolve the issues (if possible or ignore).
  7. To attach the Content database to web application, run following PowerShell command:
    Mount-SPContentDatabase –WebApplication http://mysite.brij.com –Name “SP2019_MySitehost_Content” –DatabaseServer “SP19SQLAlias”
    On completion it’ll display 100%
  8. Mount other content database to mysite
    Mount-SPContentDatabase –WebApplication http://mysite.brij.com –Name “SP2019_MySite_Content” –DatabaseServer “SP19SQLAlias”
  9. Go to Central Admin > Application Management > Change Site Collection Administrators and update Site Collection admin account.
  10. Try accessing site with url.
  11. Go to Central Admin > Manage Service Application > User Profile Service Application
  12. Update Search Centre url and My Site url.

Disable Modern Experience at Site Collection Level

Now you need to decide wheather to enable or disable the Modern Experience on site collection. By default, it's enabled. To disable the modern experience you need to disable the feature using PowerShell script as feature is not visible in UI.

#Site Collection Level
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
$site = Get-SPSite "http://sharepoint.brij.com"

#Disable modern Lists and libraries at the Site Collection Level
$featureguid = new-object System.Guid "E3540C7D-6BEA-403C-A224-1A12EAFEE4C4"
$site.Features.Add($featureguid, $true)

#Re-enable the modern experience at the site collection Level.
$featureguid = new-object System.Guid "E3540C7D-6BEA-403C-A224-1A12EAFEE4C4"
$site.Features.Remove($featureguid, $true)


Voila!! You have successfully upgraded to SharePoint 2019. Now start testing and if you find any issue please check the last post of this series or you don't find it in the list then log in a comment.

Comments

Popular posts from this blog

Installation and Configuration of Office Online Server with SharePoint 2019

Workflow Manager 1.0- Installation, Configuration and Issues

SharePoint 2019 Upgrade Part 6: SharePoint Upgrade Issues