Saturday, December 22, 2012

SQL Does Not Have the Required MaxDegree of Parallelism Setting of 1

I was installing SharePoint 2013 and while running the SharePoint Products Configuration Wizard it failed suddenly displaying the error "This SQL Service instance does not have the required maxdegree of parallelism setting of 1. Database provisioning operations will continue to fail if maxdegree of parallelism is not set 1 or the current account does not have permissions to change the setting..."

Before solving the issue, let see what this "maxdegree of parallelism".

"When SQL Server runs on a computer with more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the number of processors employed to run a single statement, for each parallel plan execution. You can use the max degree of parallelism option to limit the number of processors to use in parallel plan execution. To enable the server to determine the maximum degree of parallelism, set this option to 0, the default value. Setting maximum degree of parallelism to 0 allows SQL Server to use all the available processors up to 64 processors. To suppress parallel plan generation, set max degree of parallelism to 1. Set the value to a number greater than 1 to restrict the maximum number of processors used by a single query execution. The maximum value for thedegree of parallelism setting is controlled by the edition of SQL Server, CPU type, and operating system. If a value greater than the number of available processors is specified, the actual number of available processors is used. If the computer has only one processor, the max degree of parallelism value is ignored."
Source


You have two options to fix the issue...
1st Option

Open SQL Server Management Studio and execute the below command
sp_configure 'show advanced options', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure 'max degree of parallelism', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO

2nd Option
Open SQL Server Management Studio right click the SQL Server instance and click properties. Change the "Max Degree of Parallelism" value from 0 to 1.
 You are not done yet :)

As the SharePoint Products Configuration Wizard ran half way, the configuration database is already created. So make sure to delete the database before you run the Products Configuration Wizard again.

This problem occurs only if you execute the wizard with least privileges. If you ran the wizard with a high privileged account (If SharePoint Setup admin has sysadmin rights to the DB Server), it will automatically do the changes and continue the wizard for you.

No comments: