Order of operations problem: check for db -> create db -> check for max degree of parallelism

Sep 24, 2013 at 9:12 AM
I've got a small issue with the way AutoSPInstaller creates the config DB. This usually happens as follows:
  1. Check of DB exists
  2. Create DB
  3. Check for max degree of parallelism to be 1
The problem is that, when max degree of parallelism hasn't been configured properly, the script fails. When the setting has been corrected and the script is re-run, the script will fail again as the DB already exists.

It's a lot more logical to check for the max degree of parallelism before creating the DB, as this series of events is pretty messy for a production SQL server when it occurs. DBA's don't like to delete databases.

Is this choice of design due to technical limitations? Or can this be improved?
Coordinator
Sep 25, 2013 at 1:23 AM
AutoSPInstaller doesn't check for MaxDOP, SharePoint itself does, so not sure what can be done about this other than ensure it's set properly prior to running the script,

Brian
Sep 25, 2013 at 3:09 AM
The workaround is to allow the install account to have sysadmin fixed server role on SQL instead of (or in addition to) securityadmin and dbcreator fixed server roles. This way MaxDOP can be setup during the creation process of configuration/farm database.
Coordinator
Sep 25, 2013 at 3:18 AM
Of course - forgot about that! Thanks Joseph.

Brian
Sep 25, 2013 at 8:43 AM
Thanks for the tip!