Closed johlju closed 7 years ago
Okey, so this one is strange. I get this each time installing SQL Server 2008 R2 all of the sudden, on two different servers. Can't install it manually either. My guess is that the media has been corrupted in some way. It is the only common thing among all tests. So I'm closing this issue since it has nothing to do with the resource.
Hi, I'm having the same issue and found out that the error disappears when creating a sysadmin login for 'NT AUTHORITY\SYSTEM' in the sql servers login.
I guess this comes from the fact that we both use the 'SQLSysAdminAccounts' parameter
As long as the DSC resource runs as 'NT AUTHORITY\SYSTEM', if there is no login for the account, DSC will fail to connect to the server.
I think this is a bug. In my opinion the fix should be to add the 'NT AUTHORITY\SYSTEM' account as admin when the SQLSysAdminAccounts is set.
I actually found out that our DBA intentionally removed that account for security reasons.
Trying to use the PsDscRunAsCredential didn't work as expected (the account used to login during the Test-TargetResource is still the SYSTEM account).
So, it's not a bug in the resource itself. Anyway any idea on how to work around it would be really appreciated.
Details of the scenario you try and problem that is occurring: In rare occasions when installing SQL Server 2008 R2 (or first instance) the Database Engine service are not started, so Set-method fails when it cannot verify with Test-method. First it installs SQL2008R2 which fails, next it installs SQL2012 and that instance is started without problems.
LCM verbose log:
Event log:
The DSC configuration that is using the resource (as detailed as possible):
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running: Windows Server 2012 R2, SQL Server 2008 R2, PS 5.0
Version of the DSC module you're using, or 'dev' if you're using current dev branch: Dev