dsccommunity / SqlServerDsc

This module contains DSC resources for deployment and configuration of Microsoft SQL Server.
MIT License
359 stars 224 forks source link

SqlSetup: MSFT_SqlSetup fails on Set-TargetResource SQL2014 French #1046

Closed yvesgermain closed 6 years ago

yvesgermain commented 6 years ago

Trying to install a Named Instance on a single server using 2-InstallNamedInstanceSingleServer.ps1 as an example on a French Widows 2012 R2 server with French SQL2014 RTM using DSC. All running on the local machine. I can install SQL 2014 from the command line although I had to change the features to SQL instead of SQLEngine. Keep getting the following error:

La ressource DSC PowerShell MSFT_SqlSetup n'a pas pu exécuter la fonctionnalité Set-TargetResource. Message d'erreur: System.Exception: Test-TargetResource
returned false after calling Set-TargetResource.
    + CategoryInfo          : InvalidOperation : (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost

Here is my configuration...

Configuration Example
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory = $true)]
        [ValidateNotNullorEmpty()]
        [System.Management.Automation.PSCredential]
        $SqlInstallCredential,

        [Parameter()]
        [ValidateNotNullorEmpty()]
        [System.Management.Automation.PSCredential]
        $SqlAdministratorCredential = $SqlInstallCredential,

        [Parameter(Mandatory = $true)]
        [ValidateNotNullorEmpty()]
        [System.Management.Automation.PSCredential]
        $SqlServiceCredential,

        [Parameter()]
        [ValidateNotNullorEmpty()]
        [System.Management.Automation.PSCredential]
        $SqlAgentServiceCredential = $SqlServiceCredential
    )

    Import-DscResource -ModuleName SqlServerDSC
    Import-DscResource -ModuleName PSDesiredStateConfiguration

    node localhost
    {
        #region Install prerequisites for SQL Server
        WindowsFeature 'NetFramework35'
        {
            Name   = 'NET-Framework-Core'
            Source = 'c:\temp\Sxs' # Assumes built-in Everyone has read permission to the share and path.
            Ensure = 'Present'
        }

        WindowsFeature 'NetFramework45'
        {
            Name   = 'NET-Framework-45-Core'
            Ensure = 'Present'
        }
        #endregion Install prerequisites for SQL Server

        #region Install SQL Server
        SqlSetup 'InstallNamedInstance-INST2016'
        {
            InstanceName          = 'INST2014'
            Features              = 'SQL'
            SQLCollation          = 'SQL_Latin1_General_CP1_CI_AS'
            SourcePath            = 'c:\temp\Sxs\SQL2014'
            UpdateEnabled         = 'False'
            ForceReboot           = $false
            BrowserSvcStartupType = 'Automatic'
            PsDscRunAsCredential  = $SqlInstallCredential
            DependsOn             = '[WindowsFeature]NetFramework35', '[WindowsFeature]NetFramework45'
        }
        #endregion Install SQL Server
    }
}

Here is the error:

PS C:\temp> start-DscConfiguration -Path c:\temp -Verbose -Wait -Force
COMMENTAIRES : Effectuez l’opération « Invoquer une méthode CIM » avec les paramètres suivants : « 'methodName' = SendConfigurationApply,'className' =
MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration ».
COMMENTAIRES : Un appel de méthode du Gestionnaire de configuration local est arrivé de l'ordinateur W2K12 avec le SID utilisateur
S-1-5-21-1262646155-241375206-1410109311-500.
COMMENTAIRES : [W2K12] : Gestionnaire de configuration local : [ Début  Définir  ]
COMMENTAIRES : [W2K12]: LCM:  [ Début  Ressource]  [[WindowsFeature]NetFramework35]
COMMENTAIRES : [W2K12]: LCM:  [ Début  Test     ]  [[WindowsFeature]NetFramework35]
COMMENTAIRES : [W2K12]:                            [[WindowsFeature]NetFramework35] L’opération Get-WindowsFeature a démarré : NET-Framework-Core
COMMENTAIRES : [W2K12]:                            [[WindowsFeature]NetFramework35] L’opération « Get-WindowsFeature » s’est déroulée correctement :
NET-Framework-Core
COMMENTAIRES : [W2K12]: LCM:  [ Fin    Test     ]  [[WindowsFeature]NetFramework35]  en 0.6250 secondes.
COMMENTAIRES : [W2K12]: LCM:  [ IgnorerDéfinir  ]  [[WindowsFeature]NetFramework35]
COMMENTAIRES : [W2K12]: LCM:  [ Fin    Ressource]  [[WindowsFeature]NetFramework35]
COMMENTAIRES : [W2K12]: LCM:  [ Début  Ressource]  [[WindowsFeature]NetFramework45]
COMMENTAIRES : [W2K12]: LCM:  [ Début  Test     ]  [[WindowsFeature]NetFramework45]
COMMENTAIRES : [W2K12]:                            [[WindowsFeature]NetFramework45] L’opération Get-WindowsFeature a démarré : NET-Framework-45-Core
COMMENTAIRES : [W2K12]:                            [[WindowsFeature]NetFramework45] L’opération « Get-WindowsFeature » s’est déroulée correctement :
NET-Framework-45-Core
COMMENTAIRES : [W2K12]: LCM:  [ Fin    Test     ]  [[WindowsFeature]NetFramework45]  en 0.3910 secondes.
COMMENTAIRES : [W2K12]: LCM:  [ IgnorerDéfinir  ]  [[WindowsFeature]NetFramework45]
COMMENTAIRES : [W2K12]: LCM:  [ Fin    Ressource]  [[WindowsFeature]NetFramework45]
COMMENTAIRES : [W2K12]: LCM:  [ Début  Ressource]  [[SqlSetup]InstallNamedInstance-INST2016]
COMMENTAIRES : [W2K12]: LCM:  [ Début  Test     ]  [[SqlSetup]InstallNamedInstance-INST2016]
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Using path 'c:\temp\Sxs\SQL2014\setup.exe'.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Database Engine feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Database Engine feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Full-text feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Full-text feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Reporting Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Reporting Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Analysis Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Analysis Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Integration Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Integration Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Documentation Components feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\ConfigurationState).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Documentation Components feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Connectivity Tools feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Connectivity Tools feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Connectivity Backwards Compatibility Tools feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Connectivity Backwards Compatibility Tools feature not
detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Tools SDK feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Tools SDK feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Master Data Services (MDS) feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\ConfigurationState).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] 'Master Data Services (MDS) feature not detected.'
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Features found:
COMMENTAIRES : [W2K12]: LCM:  [ Fin    Test     ]  [[SqlSetup]InstallNamedInstance-INST2016]  en 1.0930 secondes.
COMMENTAIRES : [W2K12]: LCM:  [ Début  Définir  ]  [[SqlSetup]InstallNamedInstance-INST2016]
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Using path 'c:\temp\Sxs\SQL2014\setup.exe'.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Database Engine feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Database Engine feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Full-text feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Full-text feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Reporting Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Reporting Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Analysis Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Analysis Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Integration Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Integration Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Documentation Components feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\ConfigurationState).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Documentation Components feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Connectivity Tools feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Connectivity Tools feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Connectivity Backwards Compatibility Tools feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Connectivity Backwards Compatibility Tools feature not
detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Tools SDK feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Tools SDK feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Master Data Services (MDS) feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\ConfigurationState).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] 'Master Data Services (MDS) feature not detected.'
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Using path 'c:\temp\Sxs\SQL2014\setup.exe'.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Starting setup using arguments: /UPDATEENABLED="False"
/ACTION="Install" /INSTANCENAME="INST2014" /BROWSERSVCSTARTUPTYPE="Automatic" /FEATURES=SQL /QUIET="True" /IACCEPTSQLSERVERLICENSETERMS="True"
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Started the process with id 2852 using the path
'c:\temp\Sxs\SQL2014\setup.exe', and with a timeout value of 7200 seconds.
AVERTISSEMENT : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Setup exited with code '-2067529714'. Please see the 'Summary.txt'
log file in the 'Setup Bootstrap\Log' folder.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Using path 'c:\temp\Sxs\SQL2014\setup.exe'.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Database Engine feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Database Engine feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Full-text feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Full-text feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Reporting Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Reporting Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Analysis Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Analysis Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Integration Services feature.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Integration Services feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Documentation Components feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\ConfigurationState).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Documentation Components feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Connectivity Tools feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Connectivity Tools feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Connectivity Backwards Compatibility Tools feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Connectivity Backwards Compatibility Tools feature not
detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Client Tools SDK feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\Setup\Client_Components_Full).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Client Tools SDK feature not detected.
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Detecting Master Data Services (MDS) feature
(HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\ConfigurationState).
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] 'Master Data Services (MDS) feature not detected.'
COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Features found:
COMMENTAIRES : [W2K12]: LCM:  [ Fin    Définir  ]  [[SqlSetup]InstallNamedInstance-INST2016]  en 1.1400 secondes.
La ressource DSC PowerShell MSFT_SqlSetup n'a pas pu exécuter la fonctionnalité Set-TargetResource. Message d'erreur: System.Exception: Test-TargetResource
returned false after calling Set-TargetResource.
    + CategoryInfo          : InvalidOperation : (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost

COMMENTAIRES : [W2K12] : Gestionnaire de configuration local : [ Fin    Définir  ]
Échec de la fonction SendConfigurationApply.
    + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName        : localhost

COMMENTAIRES : L’opération « Invoquer une méthode CIM » est terminée.
COMMENTAIRES : Le temps nécessaire à l'exécution de la tâche de configuration est de 4.106 secondes

Windows server 2012 R2 in French and SQL 2014 RTM in French also.

Module SQLServerDSC version 11.0.00 and PsDesiredStateConfiguration 1.1

johlju commented 6 years ago

You see in the verbose output that it doesn't find any features. It's blank after 'Features found:'.

COMMENTAIRES : [W2K12]:                            [[SqlSetup]InstallNamedInstance-INST2016] Features found:

Reason for this is that we do not currently support the parent feature names, see issue #553. You must use the feature name for the parameter Features. Please see the Feature Parameters documentation, please also note that not all features are currently supported (help adding the missing feature is much needed). This should be better documented which is being tracked in issue #1030.

Maybe we should also output 'Features found: None' instead when this happen. Added new issue #1047 to track that.

yvesgermain commented 6 years ago

I added the Feature SQLEngine instead of SQL. Also I am using SQL2014 RTM in French. Still getting this line... COMMENTAIRES : [W2K12]: [[SqlSetup]InstallNamedInstance-INST2016] Features found:

johlju commented 6 years ago

Ah I see now in your verbose output that setup.exe is failing with and error code. Can you se why it’s failing in the summary.txt file in the Setup Bootstrap folder?

yvesgermain commented 6 years ago

It never creates the Summary.txt file or the folder structure under the C:\program files (which would be (C:\program files\Microsoft SQL Server\Setup Bootstrap\Log)

yvesgermain commented 6 years ago

If I run the following line, everything seems to work just fine... c:\temp\sxs\sql2014\setup.exe /UPDATEENABLED="False" /BROWSERSVCSTARTUPTYPE="Automatic" /AGTSVCSTARTUPTYPE="Automatic" /INSTANCENAME="INST2014" /IACCEPTSQLSERVERLICENSETERMS="True" /FEATURES=SQLENGINE /QUIET="True" /SQLSYSADMINACCOUNTS="w2k12\administrateur" /ACTION="Install" /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"

yvesgermain commented 6 years ago

I guess it never gets to run the setup.exe because there is no file structure for SQL server Under C:\program Files\ So there is no summary.txt file and no c:\program Files\Microsoft SQL Server\120\setup Bootstrap\log folder... But running the following line works fine:

c:\temp\sxs\sql2014\setup.exe /UPDATEENABLED="False" /BROWSERSVCSTARTUPTYPE="Automatic" /AGTSVCSTARTUPTYPE="Automatic" /INSTANCENAME="INST2014" /IACCEPTSQLSERVERLICENSETERMS="True" /FEATURES=SQLENGINE /QUIET="True" /SQLSYSADMINACCOUNTS="w2k12\administrateur" /ACTION="Install" /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"


From: Johan Ljunggren notifications@github.com Sent: February 15, 2018 2:48 PM To: PowerShell/SqlServerDsc Cc: yvesgermain; Author Subject: Re: [PowerShell/SqlServerDsc] SqlSetup: MSFT_SqlSetup fails on Set-TargetResource SQL2014 French (#1046)

Ah I see now in your verbose output that setup.exe is failing with and error code. Can you se why it’s failing in the summary.txt file in the Setup Bootstrap folder?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/SqlServerDsc/issues/1046#issuecomment-366040859, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ag31B1Ay_YR0-qS1VAi23Mnwtm0OSZ3Hks5tVInzgaJpZM4SHNQ9.

johlju commented 6 years ago

I think you are correct that it is not actually starting the setup.exe.

  1. Are you running the setup manually using the same account as in $SqlInstallCredential?
  2. When the SqlSetup resource starts the process, can you see setup.exe in the process list?
  3. Does the process fail instantly, does it write the next verbose line ('setup exited...') almost directly?
yvesgermain commented 6 years ago

Hi Johan,

The computer is in a workgroup so I am always logged in using the w2k12\administrateur account (local administrator). I notice that in the output it seems to use Administrateur instead of W2k12\administrateur. The setup.exe seems to crash as soon as it starts. There is an error message Setup exited with code -2067529714 which seems to be a language problem. I found this article Error 0x84C4000E (-2067529714) while installing SQL Server Express 2012 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/467864b1-4b75-4b01-8380-a09cd77fab52/error-0x84c4000e-2067529714-while-installing-sql-server-express-2012?forum=sqlexpress .

I followed the requirements and set the language to French. But the installation works fine from the command line which I copied from the Verbose Output:

COMMENTAIRES : [W2K12]: [[SqlSetup]InstallNamedInstance-INST2014] Starting setup using arguments: /ACTION="Install" /AGTSVCSTARTUPTYPE="Automatic" /IACCEPTSQLSERVERLICENSETERMS="True" /ASSYSADMINACCOUNTS="Administrateurs" /INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" /QUIET="True" /INSTANCENAME="INST2014" /SQLSYSADMINACCOUNTS="Administrateurs" /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS" /FEATURES=SQLENGINE,AS /INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL server" /UPDATEENABLED="True" /BROWSERSVCSTARTUPTYPE="Automatic"

Thanks for your help!

Yves Germain


From: Johan Ljunggren notifications@github.com Sent: February 16, 2018 2:00 PM To: PowerShell/SqlServerDsc Cc: yvesgermain; Author Subject: Re: [PowerShell/SqlServerDsc] SqlSetup: MSFT_SqlSetup fails on Set-TargetResource SQL2014 French (#1046)

I think you are correct that it is not actually starting the setup.exe.

  1. Are you running the setup manually using the same account as in $SqlInstallCredential?
  2. When the SqlSetup resource starts the process, can you see setup.exe in the process list?
  3. Does the process fail instantly, does it write the next verbose line ('setup exited...') almost directly?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/SqlServerDsc/issues/1046#issuecomment-366327780, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ag31B0oXanDDRxSVTxDHKRh_d3dEWGzKks5tVdA4gaJpZM4SHNQ9.

yvesgermain commented 6 years ago

Tried again with version 11.1.0.0 of SQLserverDSC. This time the computer is joined to a domain. Summary.txt The error message in the Summary.txt is: Exit message: Missing system administrator account. To continue, provide at least one Windows account to provision as a SQL Server system administrator. This is my configuration: SqlSetup SQL2014{ Action = 'Install' SourcePath = 'c:\SQL2014\SQL2014' InstanceDir = 'C:\Program Files\Microsoft SQL Server' INSTANCEID = 'SQLDEV2014I1' InstanceName = 'SQLDEV2014I1' INSTALLSHAREDWOWDIR = 'C:\Program Files (x86)\Microsoft SQL Server' InstallSharedDir = 'C:\Program Files\Microsoft SQL Server' INSTALLSQLDATADIR = 'D:\Program Files\Microsoft SQL Server' UpdateEnabled = $true ErrorReporting = $false Features = 'SQL' UpdateSource = "MU" SecurityMode = 'SQL' BROWSERSVCSTARTUPTYPE = "Automatic" SQLCOLLATION = "French_CI_AS" SQMREPORTING = $false DependsOn = '[File]DSC_Source','[File]SQL2014' SQLSvcAccount = $SqlServiceCredential AgtSvcAccount = $SqlAgentServiceCredential SQLSysAdminAccounts = 'dev\t87' PsDscRunAsCredential = $SqlInstallCredential } So I do have a Administrator account.

yvesgermain commented 6 years ago

Here is the DSC output of running the script DSCoutput.txt

yvesgermain commented 6 years ago

Summary_SQL2014_20180323_113033.txt Detail.txt

yvesgermain commented 6 years ago

Finally found the issue. IN control panel Under Regional settings, Under administration tab, you have to click on Copy parameters and then copy the existing parameters for account systems. Please close this issue.

Thanks!

johlju commented 6 years ago

@yvesgermain Awesome detective work there! Hopefully this helps the next user. If I understand this correctly, the problem was basically that you are using French SQL Server on English OS? Because of that you needed to make the environment (regional settings) for the account running SQL Server into French?

yvesgermain commented 6 years ago

Hi Johan,

Both my Windows OS and SQL Server are in French. But I am in Canada (Québec). But I have to change my regional settings to France to get SQL server to install.

But I needed to do more than change my region to France to get DSC to work, there is an advanced setting that change the SYSTEM account also, that I never noticed before. So changing the region to France worked to install SQL server for my account but not for DSC, even though I tried to run DSC under my account by using the PSDscRunAsCredential to my account.

[cid:1d6525b1-d6f9-4ad8-8fef-4e870d94602e][cid:06591238-b6ed-42ec-be27-b30f6602b02d][cid:cfa8d68a-bf42-45b9-8333-4f45d532e483]

Yves Germain

From: Johan Ljunggren [mailto:notifications@github.com] Sent: Monday, April 16, 2018 11:10 AM To: PowerShell/SqlServerDsc SqlServerDsc@noreply.github.com Cc: yvesgermain yves-germain@outlook.com; Mention mention@noreply.github.com Subject: Re: [PowerShell/SqlServerDsc] SqlSetup: MSFT_SqlSetup fails on Set-TargetResource SQL2014 French (#1046)

@yvesgermainhttps://github.com/yvesgermain Awesome detective work there! Hopefully this helps the next user. If I understand this correctly, the problem was basically that you are using French SQL Server on English OS? Because of that you needed to make the environment for the account running SQL Server into French?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/SqlServerDsc/issues/1046#issuecomment-381638873, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ag31B3THE9dBod8lEpVUGYBy4bYrov66ks5tpLQ6gaJpZM4SHNQ9.