Sunday, August 17, 2014

SharePoint 2013: The exclusive inplace upgrader timer job failed

Print Now
Problem

You run the SharePoint Products Configuration Wizard, after installing patches.  The Wizard runs through configuration steps 1 - 8 without issue, but then fails on step 9.  You review the diagnostics log (PSCDiagnostics_...) and see the following error message:
The exclusive inplace upgrader timer job failed. 
You then review the Upgrade log and see the following:
08/16/2014 23:46:36.44 OWSTIMER (0x2F90) 0x1330 SharePoint Foundation Upgrade SPContentDatabaseSequence al2pi ERROR Error running SQL DDL Script:                   IF  EXISTS (SELECT TOP 1 1 FROM sys.database_principals WHERE name = N'db_owner' A.... System.Data.SqlClient.SqlException (0x80131904): Cannot alter the role 'db_owner', because it does not exist or you do not have permission.   
Procedure
  1. Identify SharePoint Timer service account
    1. Login to any machine in the farm hosting SharePoint.
    2. Open the Services control panel.
    3. Scroll down to the SharePoint Timer Service
    4. Identify the account running this service (this will usually be the SharePoint farm service account, eg, spFarm).
    5. Logout
  2. Update farm service account database mapping
    1. Login to the farm's SQL Server as an administrator
    2. Open SQL Server Management Studio
    3. Expand Security > Logins
    4. Double-click on the farm service account
    5. In the left-hand Select a page panel, select User Mapping
    6. In the right Results panel, select each database in turn and check to see whether the db_owner checkbox is checked.  Don't worry about the system databases (master, model, msdb, tempdb), nor the workflow databases (eg, sbGatewayDatabase, WFInstanceManagement), though, it would be a good thing to do so, if you also used the farm service account as the workflow service account.
    7. Click OK.
  3. Update SharePoint
    1. Login to the first WFE as the SharePoint Setup user Administrator account. 
      NOTE: it is imperative that you run this using the SharePoint Setup User Administrator account.  Using another account, such as your own administrator account, may complete the Wizard, but may also introduce subtle inconsistencies into the server and farm configuration that can be very confusing and challenging to resolve.
    2. Launch the SharePoint Products Configuration Wizard.
    3. etc...
References
Notes
  • Thanks to Bernado Nguyen-Hoan for posting the original solution to this problem.
  • Bernado implemented this solution by granting the farm service account the sysadmin role to the database server.  While this certainly works, a least-permissions approach is what I took, ensuring that the farm service account was granted dbo permissions to all farm databases.
  • This problem was encountered after installing the August 2014 PU patches for SharePoint 2013.
  • If after launching SQL Management Studio, you don't see all the databases listed, or you see the momentary prompt appear, [some] databases were unavailable and so won't be listed, be sure you launched Management Studio with elevated privileges.

1 comment:

RockyDu said...

Awesome. This post has helped me to resolve my SharePoint Upgrade issue. Thank you so much :)