SqlServerDsc icon indicating copy to clipboard operation
SqlServerDsc copied to clipboard

SqlSetup: which parameter responds to the "Grant perform Volume Maintenance Task ...

Open NemoDima opened this issue 5 years ago • 5 comments

Tell me please, which parameter in SqlSetup responds to the "Grant perform Volume Maintenance Task privilege to SQL Server Database Engine Service" option? изображение

NemoDima avatar Mar 25 '20 08:03 NemoDima

I don't think there is a parameter for that yet. Is there are argument for setup.exe that corresponds for that setting or is it something that need to be configured after setup.exe has run finished? 🤔

johlju avatar Mar 27 '20 15:03 johlju

There are a few ways:

  1. ConfigurationFile.ini :
; Set to "True" to enable instant file initialization for SQL Server service. If enabled, Setup will grant Perform Volume Maintenance Task privilege to the Database Engine Service SID. This may lead to information disclosure as it could allow deleted content to be accessed by an unauthorized principal. 

SQLSVCINSTANTFILEINIT="True"
  1. By Local Security Policy: https://medium.com/geopits/enabling-instant-file-initialization-5ba511e38e2b

  2. /SQLSVCINSTANTFILEINIT argument: https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-instant-file-initialization

NemoDima avatar Mar 27 '20 17:03 NemoDima

Then it is the argument we should use, it is apparently set to string value True or False

/SQLSVCINSTANTFILEINIT=True

https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-ver15

johlju avatar Mar 27 '20 17:03 johlju

Did anything come of this in the end? We're currently trying to replace a scripted SQL install using DBATools with SqlServerDsc and having to find a long way round to set the User Rights Assignment values that the -PerformVolumeMaintenanceTasks switch sets. Would be great to have this as a param on the SqlSetup resource.

SimonBurrowsBD avatar May 27 '21 16:05 SimonBurrowsBD

There has not been anyone in the community that has sent in a PR for this.

johlju avatar Jun 08 '21 06:06 johlju