-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlSetup : $SecurityMode parameter of 'Windows' causes FAILURE of SQL instance installation/setup #1185
Comments
Shout if you've any questions. |
Thank you for the detailed summary! I see the problem here, and agree that this property should probably not have the option to be set to Windows. I say probably because I haven’t seen the code, if there are anything saying this should have Windows option. Labeling it as a bug, and help wanted so that anyone in the community can run with it. |
Again, relating to #1186 , it would be nice to assign this variable/parameter with a Having said that, I can't see how specifying I suspect it may just a case of removing use of the |
@johlju This parameter should probably be a boolean like |
@mdaniou I could potentially be another authentication method in the future that is enabled using this property, so unless setup.exe argument is a boolean, I think we keep it a string as well? Otherwise we need to do a breaking change now, and another breaking change if that day comes. |
@johlju ok so I guess that we only need to fix the behavior when Windows is chosen |
When using Windows and SQL authentication, the So, I think we should either
Although I like alternative 2, that could potentially become a problem if the setup.exe argument |
I am writing the DSC code for my unattended install & hit the same problem. SQL Setup complains Exception type: Microsoft.SqlServer.Chainer.Infrastructure.InputSettingValidationException I cannot leave the value empty & Windows, whilst a valid DSC entry does not carry properly " /SQLTEMPDBLOGDIR="E:\MSSQL15.SQLMGMT\MSSQL\Data" /SQLUSERDBDIR="S:\MSSQL15.SQLMGMT\MSSQL\Data" /IACCEPTSQLSERVERLICENSETERMS="True" /SECURITYMODE="Windows" /INSTALLSHAREDWOWDIR="C: The only way forward I can see is to reloop the data section after the install has concluded to set the value for the node as required, which is counter-intuitive. |
My workaround after a few days of consideration: I am using a post install registry hack using a registry DSC resource
LoginMode for the node in question is either set to 1 (Windows Only) or 2 (Mixed Authentication) |
New to DSC and SQL Install, but otherwise senior, this is a charming workaround. Thanx for sharing |
Here I am commeting on the same post. |
We should remove this: SqlServerDsc/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 Lines 2691 to 2694 in 47e02f2
And then switch the ValidateSet to only contain And update unit test accordingly. |
- SqlSetup - The parameter `SecurityMode` now only (correctly) allows the value `SQL` (issue #1185).
Details of the scenario you tried and the problem that is occurring
When applying/setting a MOF file generated from a PowerShell DSC configuration that uses the "SqlSetup" ("MSFT_SqlSetup") DSC Resource...
... although the
SqlServerDsc
documentation seems to state that theSecurityMode
can be set toWindows
orSQL
(i.e.SQL
is effectively "Mixed Mode").......when I have provided a
SecurityMode
value ofWindows
, this fails to install SQL Server 2016 Enterpise Core (although I'd possibly expect to similar behaviour with other editions/versions).MOF File Feedback
The feedback from the applying/setting of the MOF file shows the following configuration switch/parameter value was used on the (presumably) command line call...
/SECURITYMODE="Windows"
It also highlighted a feedback/non-terminating error message and suggested viewing a
Summary.txt
file in theSetup Bootstrap\Log
directory within the SQL Server shared installation folders (in this case within the130
subdirectory)."Summary.txt" log file contents
The error message in the SQL setup
Summary.txt
file clearly shows an exception has been throw. This reads as...The only supported value for Authentication Mode is "SQL".
Supported command line switches
The following page...
Install SQL Server from the Command Prompt
...also shows that
SQL
is the only option allowed for this switch/parameter so providing a value ofWindows
would appear to be incorrect, and, I presume, this behaviour is undesired (i.e. a bug).Other notes/points
I also tried this with a $null value (i.e. I set
SQLSecurityMode
to $null) and this also seemed to try to useWindows
in the installation command line switch/parameter (perhaps as a default value).I'd still like to be able to provide/set a value of
Windows
or $null to this property/parameter and still have the installation work (and setup only Windows authentication on the SQL instance). I would suspect that passing the (presumably, default)Windows
value to the\SECURITYMODE
switch/parameter needs to be reemoved.I'm unsure if a command line
\SECURITYMODE
switch/parameter value of "Windows" was allowed in earlier SQL Server versions but has since been removed?Also, I suppose you can now install certain SQL Server versions on Linux also.
The DSC configuration that is using the resource (as detailed as possible)
Version of the operating system and PowerShell the target node is running
Windows 2016 Core
SQL Server edition and version the target node is running
SQL Server 2016 Core
What SQL Server PowerShell modules, and which version, are present on the target node.
N/A
Version of the DSC module you're using, or write 'dev' if you're using current dev branch
SqlServerDsc - 11.2.0.0
The text was updated successfully, but these errors were encountered: