2. Attach Service Applications
By now, you have successfully set your
SharePoint 2010 production databases to read-only and created backups
of each database.
I shall assume at this point that you have a
new provisioned SharePoint 2013 farm with copies of the database
backups on the SQL Server.
Note Avoid
hosting your SharePoint 2010 farm and SharePoint 2013 farm on the same
SQL Server instance. This can cause confusion with database name
conflicts. Generally, it is not a good idea to host multiple versions
of SharePoint farms on the same SQL Server instance.
I recommend that you take a quick look at the
service applications provisioned in your SharePoint 2013 farm.
SharePoint will not prohibit you from upgrading a legacy service
application while a new SharePoint 2013 version of the same service
application exists in the farm. However, for demonstrating a clean
upgrade process, ensure that you have only the bare minimum farm
provisioned.
You are now ready to begin the process of
attaching your service application database. Cast back to the previous
subsection and review the list of databases—you should have a backup
file for each database listed. The following steps detail how to
restore these databases using SQL Management Studio:
- Open SQL Management Studio.
- Right-click the Databases node in the Object Explorer.
- Click the Restore Database menu item.
- Change the source location as From device.
- Click the ellipses and then the Add button on the next dialog.
- Browse for the database backup file.
- Click the OK button.
- Check the check box to restore the selected database (Figure 4).
- Click the drop-down for the destination database.
- Select the database to restore.
Note Do
not restore to an existing database; you should see the new name of the
database found in the backup. If you have a name conflict, provide a
new database name in the database drop-down box.
Figure 5 shows a screenshot of my SQL Management Studio with databases restored.
The next step in the upgrade process is to
enable write access to these attached databases. If you leave these
databases in read-only state, SharePoint cannot make changes to the
underlying schema and data to support SharePoint 2013. The steps
required to set a database as writable are the mirror of the steps to
make a database read-only.
- Right-click the database in SQL Management Studio.
- Select the Properties menu item.
- Choose the Options category on the right of the dialog.
- Scroll down to the option for Database Read-Only.
- Set the option to False and then click the OK button.
Up until now, life has been peachy. Now is the
part where you marry your legacy service configuration with your new
SharePoint 2013 farm. If you have any database issues, or did not
configure the destination correctly, now is the time when you will run
into issues (hopefully not). This highlights the need for good planning
and pre-upgrade maintenance.
Before embarking on the process of upgrade,
this is a good time to review each of the restored databases, making
sure that you can query each, and that security is intact. If you share
a common Active Directory between environments, and use Windows
accounts for all SQL databases, chances are that security and
permissions remain intact.
The process to upgrade service application
databases into working service applications requires four major steps,
described as follows:
- Start the service instances.
- Create service applications and attach the databases.
- Create proxies for each service application.
- Verify that proxies reside in the default group.
Using the Business Connectivity Services (BCS)
as an example, I shall now review the major steps and provision a new
service application from the legacy backup data and demonstrate BCS
working in my new SharePoint 2013 farm. I shall begin by ensuring that
I have started the BCS service in the farm.
- Open Central Administration.
- Click the link for Manage Services on Server.
- Scroll to the Business Connectivity Services service.
- Click the link to start the service (if not started).
- Feel free to start other service for service applications you intend to upgrade later.
STARTING THE SEARCH SERVICE
Unfortunately,
you cannot start the search service instance from Central
Administration, but you can accomplish this task using PowerShell,
demonstrated as follows:
- Open a SharePoint 2013 Management Shell with elevated permissions
- Enter the following PowerShell Cmdlets:
$SearchInst = Get-SPEnterpriseSearchServiceInstance
Start-SPServiceInstance $SearchInst
You have now successfully started the services
in the SharePoint 2013 farm. SharePoint services typically translate to
Windows services on the SharePoint servers and provide a specific set
of operations. SharePoint provides access to these service operations
via hosted service applications. A service application consists of a
WCF service, hosted in Internet Information Services (IIS)
server, which exposes an endpoint so application proxies can connect to
the service application and leverage the functionality of the
underlying service. The following steps demonstrate how to provision a
new Business Connectivity Service application and proxy, using
PowerShell:
- Open a SharePoint 2013 Management Shell .
- Obtain the identity of the service application pool with the following Cmdlet:
$applicationPool = Get-SPServiceApplicationPool -Identity ' App Pool Identity '
- The name of my application pool is “SharePoint Hosted Services.”
You can obtain a list by executing the previous Cmdlet with no
assignment or parameters.
- Create a new BCS service application with the following Cmdlet,
replacing the name of the database with that attached to SQL Server,
mentioned earlier.
New-SPBusinessDataCatalogServiceApplication -Name 'BCS Service' -ApplicationPool $applicationPool -DatabaseName 'BDC_Service_DB'
- Open Central Administration.
- Click the link to check the upgrade status, under the Upgrade and Migration heading.
- You should see a page like that in Figure 6.
Note Each
service application uses different PowerShell Cmdlets to provision a
new service application instance and proxy.
The preceding example should provide you with
the necessary steps to upgrade the Managed Metadata Service, Secure
Store, PerformancePoint, User Profile, and Search, as well. To assist
you further, refer to Table 1 for the specific PowerShell Cmdlets to perform the database and service upgrades.
Table 1. PowerShell Cmdlets for Service Application Upgrades
Now that you have completed upgrade of all of
the managed service applications, you must check that each proxy
resides in the default group. Open a SharePoint 2013 Management Shell
and execute the following PowerShell Cmdlets:
$pg = Get-SPServiceApplicationProxyGroup -Identity " "
$pg.Proxies
Specifying a blank name for the proxy group tells the preceding Cmdlet that you want the “default” proxy group.