Fixing the Issues
When you’re looking at the output of Test-SPContentDatabase you should start at the top, because fixing issues there will oftentimes fix issues downstream.
The first two reported issues refer to missing
Features. Although SharePoint 2013 can’t tell you the name of the
missing Feature, it does provide the Feature’s ID and its description
to help you figure it out. In this case, the Feature is referenced in
the database, but the files for the Feature do not exist on the
SharePoint 2013 farm being tested against. Depending on what the
Feature does, that may or may not be a big deal. While the message
indicates what the Feature is, it doesn’t indicate where it is
referenced. That will help you figure out what needs to be installed,
or determine if the web or site referencing the Feature can be deleted.
Test-SPContentDatabase has an optional parameter, -ShowLocation,
which provides the GUID of the web or site collection that references
the Feature. You can take that information back to the farm from which
the database came to find the Feature reference. Note that on large
databases, the -ShowLocation parameter may significantly increase the amount of time Test-SPContentDatabase takes to run.
After you’ve either installed the missing Feature or deleted the web or site collection that references it, run Test-SPContentDatabase
again. In this case, installing the ShortURL Feature will clean up the
MissingFeature issues, as well as the MissingSetupFile and
MissingAssembly issues later in the output.
If you can’t figure out which Feature is missing,
or aren’t able to install it into your SharePoint 2013 farm for
whatever reason, don’t worry, all is not lost. While SharePoint is
unhappy about these issues, it’s not terribly concerned. Notice that
each issue has an UpgradeBlocking
property. This is SharePoint’s way of waving the white flag and
admitting that it can’t handle the issue it found. In the case of the
two issues reported here, neither of them has UpgradeBlocking
set to true. Therefore, although SharePoint has found a problem, it’s
not anything it can’t handle, so you can go ahead and attach the
database. Again, depending on what the missing Feature did, the content
in the database may or may not render correctly. As you’re fixing
issues, keep your eye on the UpgradeBlocking property.
It says it will not be able attach the site
located at /. This is because the Upgrade web app already has a site
collection in its root. This is the site collection used to verify that
DNS and everything is working correctly. Because that site collection
is no longer needed, you can either delete the site collection or
detach the content database that was created along with the web
application.
The issue is in the category MissingSetupFile. In
this case the setup file is part of the ShortURL Feature mentioned in
the first issue. This is why you start at the top. If all the
MissingFeature issues are addressed and you still have MissingSetupFile
issues, then you can troubleshoot them individually.
Figure 2
indicates some issues that are not part of the missing Feature.
Instead, they were caused by customizations that were made to a blog in
one of the site collections. Clever readers may have already figured
out that the database in the figures is from http://www.toddklindt.com. It’s had a few bad things done to it. The blog MissingSetupFile issues are probably related to those bad things.
The next two issues in Figure 3
have the category LegacyUIDetected. This database was originally
created in SharePoint 2007, and not all of the webs have been visually
upgraded to the SharePoint 2010 interface. Like the Remedy section
says, the recommended approach is to go back to your SharePoint 2010
farm and switch the UI to the SharePoint 2010 mode and make sure
everything works. Then attach it to your SharePoint 2013 farm. If you
don’t do that, all the webs will be automatically changed to the
SharePoint 2010 UI. While that will probably be fine, it’s better to
control that change yourself.
The next issue refers to a missing assembly,
which is part of the ShortURL Feature that was missing in the first
issue. Again, fixing the issues from the top down can keep you from
chasing your tail on little issues like missing files and assemblies.
When the list of issues is so long that it scrolls through the
scrollback buffer it’s tempting to start with the issues you can see.
Always start at the top. You’ll save yourself time, and possibly even
pull out less hair during your upgrades.
The final issue that Test-SPContentDatabase
found is an authentication mode issue. The database tested came from a
SharePoint 2010 web application that was using classic-mode
authentication, but the web application it was tested against uses
Claims.
Additional Parameters
Before attaching this database and upgrading site collections, there is one additional parameter of Test-SPContentDatabase to cover, ShowRowCounts. This parameter gives you the row count for each table in the content database before it reports the issues. Figure 4 shows example output.
Here you can see the row counts for the first
five tables in the content database. Getting this information in not
necessary in most cases. It can help in scenarios where the upgrade
process is taking longer than expected. It exposes issues such as an
excessive number of document versions. Even if you don’t need the
information, it’s interesting to see.
Now that the database is tested, it’s time to attach it.