SharePoint Server

Step by Step Guide to Migrate from SharePoint 2013 to SharePoint 2016 – Part 2

Migration Guide – SharePoint 2013 to SharePoint 2016:

Step by Step Guide to Migrate from SharePoint 2013 to SharePoint 2016 – Part 1
Step by Step Guide to Migrate from SharePoint 2013 to SharePoint 2016 – Part 3
Step by Step Guide to Migrate from SharePoint 2013 to SharePoint 2016 – Part 4
Step by Step Guide to Migrate from SharePoint 2013 to SharePoint 2016 – Part 5

In the first part of this series we showed you how to configure a new SharePoint Server 2016 environment. Now we will go through the process of copying databases from the SharePoint Server 2013 (SP1) environment to the SharePoint 2016 environment. This process will be completed using the backup and restore process to copy the database.

Copying databases to the new SharePoint 2016 farm
Pre-requisites

Before starting the database copy process, make sure your environment meets the following pre-requisites.

The account that you use to copy the databases must have access to SQL Server Management Studio on both the SharePoint 2013 and 2016 environments. It should also have access to a location on the network that can be accessed from both the new and old environments to store the databases’ copies.

Ensure that the account that will be used to set the databases to read-only and read-write is a member of the db_owner fixed database role for the content databases that are to be upgraded. You should check for and repair all consistency errors before backing up the databases.

Ensure that the proper service pack or update is applied to the SharePoint 2013 environment. If the remote blog storage (RBS) is being used, then SharePoint Server 2013 with Service Pack 1 (SP1) must be running in the environment before starting the upgrade process.

The SharePoint 2013 databases should be set to read-only

To allow users to access the SharePoint Server 2013 environment, the databases should be set to read-only before backing up. This will ensure that all the data is captured in the backup and the current state of the environment is restored and upgraded without further changes. When the databases are made read-only, users will be able to view the content without adding or changing it. In this blog, we will be using SQL Server tools to do this.

Follow the below steps in the SharePoint Server 2013 (SP1) environment:

  1. Ensure that the user account that is being used for this is a member of the db_owner fixed database role for the databases.
  2. Open the SQL Server Management Studio, go to Object Explorer, connect to an instance of the Database Engine, after that expand the server, and then expand ‘Databases’.
  3. Identify the database(s) that should be made read-only, right-click on the database(s), and then click on ‘Properties’.
  4. ‘Database Properties’ dialog box will open up, go to ‘Select a page’ section, and click ‘Options’.
  5. Go to ‘Details pane -> Other -> State’ section, click the arrow next to ‘Database Read-Only’, and then select ‘True’.

Alternatively, SET clause of the ALTER DATABASE statement in Transact-SQL can be used to configure the READ_ONLY database availability option.

Taking a back-up of the SharePoint Server 2013 databases using SQL Server tools

Take a back up of the databases in SQL Server Management Studio to ensure that your data is in safe state. Back-ups are also required for a database-attach upgrade. The back-up procedure should be completed for the following databases in SharePoint Server 2013:

  • All the content databases
  • These service application databases: Business Data Connectivity, Managed Metadata

PerformancePoint, and Secure Store.

As configuration or admin content databases are recreated when you set up the SharePoint Server 2016 server farm, you do not have to back up these databases in SharePoint 2013. Similarly, the Central Administration site collection upgrade is not supported.

Follow the below steps in SharePoint 2013 to create backups of the read-only content databases:

  1. Confirm that the user account that is being used for this purpose is a member of the ‘db_owner’ fixed database role for the databases.
  2. Go to ‘Management Studio -> Object Explorer’, connect to a Database Engine instance, expand the server node, and then expand the ‘Databases’ node.
  3. Open the context menu by right-clicking the database that you want to back up, go to the ‘Tasks’, and then click ‘Back Up’. The ‘Back Up Database’ dialog box appears.
  4. Go to the ‘Source’ area, inside the ‘Database’ box, verify the database name.
  5. Select ‘Full’ in the ‘Backup type’ box.
  6. Select ‘Database’ under ‘Backup component’.
  7. Go to the ‘Backup set -> Name’ box. Enter a backup set name or accept the default name.
  8. Go the ‘Destination’ area. State the type of backup destination i.e. either ‘Tape’ or ‘Disk’, and then state the destination. If you want to specify a different destination, click ‘Add’.
  9. Click ‘OK’ to begin the backup process.

To back up all the content and appropriate service application databases that SharePoint Server 2013 uses in your environment, repeat this process.

Copy the backup files to the new environment

Copy the backup files that were created in the previous process from the SharePoint 2013 setting to the new environment.

Restore the database backup

After configuring the new environment, the back-up database copies can be restored to the SQL Server. Restore the databases one by one, and start with a new database only after verifying that the restoration has worked properly for the previous one.

Ensure that you have a copy of the original backups in reserve, because if the upgrade fails you will need to try again.

Follow these steps to restore a backup copy of the database using SQL Server tools:

  1. Make sure that the account that will be doing this procedure is a member of the ‘db_owner’ fixed database role for the databases.
  2. Expand the server name after connecting to the appropriate instance of the SQL Server Database Engine, in the Object Explorer.
  3. Click ‘Restore Database’ in the context menu that opens when you right-click on the ‘Databases’. The Restore Database dialog box opens up.
  4. In the Restore Database dialog box, go to ‘General page -> To database’, and enter the name of the database to be restored.

An important thing to note here is that you can change the name of the restored database from a long GUID to a shorter, more user-friendly one. Don’t forget to change the database and log file names in the MDF and LDF files so that they match.

  1. Select the default option (most recent) in the ‘To a point in time’ text box.
  2. Click ‘From device’ to state the source and location of the backup to restore.
  3. Ensure that the backup file is selected in the ‘Backup media’ box in the ‘Specify Backup’ dialog box.
  4. Click Add in the Backup location area.
  5. Select the file that has to be restored in the ‘Locate Backup File’ dialog box, and click OK, and then, in the Specify Backup dialog box, click OK.
  6. Go to ‘Restore Database’ -> ‘Select the backup sets to restore’, select the ‘Restore’ check box next to the most recent full backup.
  7. Go to ‘Restore Database’ -> ‘Options’, select the ‘Overwrite the existing database’ check box under ‘Restore options’.
  8. To start the restore process. Click OK.
Setting databases to the read-write mode

A database that is set to read-only mode cannot be upgraded. The database must be set back to read-write on the SharePoint Server 2016 before they can be attached and upgraded.

Perform the following steps in the SharePoint 2016 environment to set a database to read-write mode using SQL Server tools:
  1. Open the ‘SQL Server Management Studio’. Go to ‘Object Explorer’, connect to a Database Engine’s instance, expand the server, under it, and expand ‘Databases’.
  2. Select the database that you want to configure to be read-write, right-click the database, and then click Properties.
  3. ‘Database Properties’ dialog box opens up, in the ‘Select a page’ section, click Options.
  4. Go to the details pane, under ‘Other’, go to the ‘State’ section, click the arrow next to ‘Database Read-Only’, and then select ‘False’.

Look out for the next post in our SharePoint migration series where we will discuss how to upgrade service applications to SharePoint 2016.

Reference: https://technet.microsoft.com/en-us/library/jj839720(v=office.16).aspx

Leave a Reply

Your email address will not be published. Required fields are marked *