Blokjes

Blokjes

Thursday, January 7, 2016

Invalid object name 'dbo.ECMUsage'

After attaching (restoring) our SharePoint 2010 Managed Metadata service application database to our SharePoint 2016 beta 1 development environment, upgrading the database schema failed. This resulted in a partially working service application with occasional "Operation failed..." messages.

Checking the Databases Upgrade status (Upgrade and Migration > Review database status) stated the following for our Managed Metadata database:
Database is in compatibility range and upgrade is recommended.

Checking the Upgrade status (Upgrade and Migration > Check upgrade status) pointed me to an upgrade logfile. This file contained the following error messages:

ERROR Action 16.0.9.0 of Microsoft.SharePoint.Taxonomy.Upgrade.TaxonomyDatabaseSequence failed. 46e6529d-376c-8084-2d87-feca3cee9bb5
ERROR Exception: Invalid object name 'dbo.ECMUsage'. 46e6529d-376c-8084-2d87-feca3cee9bb5
ERROR   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)     at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)     at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)     at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)     at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()     at Microsoft.Office.Server.Data.SqlSession.ExecuteScript(TextReader textReader, Int32 commandTimeout)     at Microsoft.SharePoint.Upgrade.SPDatabaseAction.ExecuteSql(String sql, Int32 commandTimeout)     at Microsoft.SharePoint.Taxonomy.Upgrade.TaxonomyDatabaseAction_16_0_9_0.Upgrade()     at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade() 46e6529d-376c-8084-2d87-feca3cee9bb5

Apparently, upgrading from schema version 14.0.10.0 to target schema version = 16.0.10.0 didn't go so well on my SharePoint 2016 environment. The biggest issue seems to be the missing table "ECMUsage", which should be added to the schema somewhere along the upgrade way.

Solution
Upgrade the Managed Metadata service application database on a SharePoint 2013 environment first. This will add the ECMUsage table and prepare the database for the upgrade on the SharePoint 2016 beta 1 environment.

In short, the upgrade from the Managed Metadata service application from SharePoint 2010 to SharePoint 2016 (beta 1) is as follows:

  1. On SharePoint 2010, mark MM database as read-only and make back-up
  2. On SharePoint 2013, restore the SharePoint 2010 MM database back-up and unmark as read-only
  3. On SharePoint 2013, create a new MM service application (using PowerShell) pointing to the restored DB. This will upgrade the MM database to the 2013 schema.
  4. On SharePoint 2013, mark MM database as read-only and make back-up
  5. On SharePoint 2016 (beta 1), restore the SharePoint 2013 MM database back-up and unmark as read-only
  6. On SharePoint 2016 (beta 1), create a new MM service application (using PowerShell) pointing to the restored DB. This will also upgrade the MM database to the latest 2016 (beta 1) schema.
More details regarding the exact upgrade steps can be found on TechNet:


Cheers.

No comments:

Post a Comment