Skip to content
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

There is no way to enable the necessary features of the SQL Server #3522

Open
MirolimMajidov opened this issue Aug 15, 2023 · 9 comments
Open
Labels
Command-Configure Issue related to WinGet Configuration Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@MirolimMajidov
Copy link

MirolimMajidov commented Aug 15, 2023

Brief description of your issue

I'm using the WinGet configuration for installing some necessary applications with components by creating a Winget configuration (YAML) file and using that from the Dev Home. I did all of them except the SQL Server features. I'm able to install the SQL server, but I could not enable (Install) the "Full-text search" and "FileStream" features of the SQL Server.

Steps to reproduce

There is my configuration file. The first step is passing but the second is not:

#yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
  resources:
    - resource: Microsoft.WinGet.DSC/WinGetPackage
      id: sqlServerPackage
      directives:
        description: Install Microsoft SQL Server 2022 Developer
        allowPrerelease: true
      settings:
        id: Microsoft.SQLServer.2022.Developer
        source: winget
    - resource: Microsoft.SqlServerDsc/SqlServerFeature
      dependsOn:
        - sqlServerPackage
      directives:
        description: Enable necessary SQL Server features
      settings:
        features: 'SQLENGINE, FULLTEXT'
        filestreamlevel: 1
  configurationVersion: 0.2.0

Expected behavior

Somehow we should be doing that because a lot of times just installing the SQL Server is not enough to use that without enabling necessary features or changing the configuration.

Note: If there is a way to do that by a PowerShell script, please show me an example of how to call the PowerShell script from the winget Yamle configuration, until implementing (fixing) this functionality. I did not find any thing for that.

Actual behavior

It is failing from the second step without any errors.

Environment

I am using the latest version of WinGet and Windows 11
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Aug 15, 2023
@stephengillie stephengillie added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Needs-Triage Issue need to be triaged labels Aug 15, 2023
@stephengillie
Copy link

Feature request: Support configuration files. (We might already have this request in another Issue.)

@MirolimMajidov
Copy link
Author

MirolimMajidov commented Aug 16, 2023

Feature request: Support configuration files. (We might already have this request in another Issue.)

@stephengillie
Our company has close to 100 software engineers. So, we are planning to use the Dev Home to decrease the setting up the dev environments. As I said, we have prepared the configuration files to install and customize all necessary applications except the MS SQL Server. That means there is still manual work to install the SQL Server.

You already said you have plans to implement this feature. How long do you think it might take?
If it takes more than a week or a month, could you (someone else) show me a workaround until implementing this functionality?

@stephengillie
Copy link

Hi @MirolimMajidov,

Thanks for explaining your situation and goals. I'm not sure even if this is on our roadmap currently. I'll defer to @denelon for the best info about our future feature plans.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Command-Configure Issue related to WinGet Configuration label Aug 18, 2023
@denelon
Copy link
Contributor

denelon commented Aug 18, 2023

@MirolimMajidov, I did a quick search for Microsoft.SqlServerDsc at the PowerShell gallery. I didn't see any results. Where did you locate that PowerShell module?

@denelon
Copy link
Contributor

denelon commented Aug 18, 2023

There is a DSC Script Resource. The primary thing to be cautious of is to make sure your script is idempotent so it can be run multiple times without causing a failure or other unintended side effects.

@MirolimMajidov
Copy link
Author

@denelon I'm not familiar with the Microsoft.SqlServerDsc, but it seems we can do that with DSC SqlServer script.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention Issue needs attention from Microsoft and removed Needs-Author-Feedback Issue needs attention from issue or PR author labels Aug 31, 2023
@denelon denelon removed the Needs-Attention Issue needs attention from Microsoft label Oct 13, 2023
@denelon
Copy link
Contributor

denelon commented Oct 13, 2023

@johlju I'm not familiar with SQL DSC. Do you have any docs or anything we could point a user at?

We could also work on a sample configuration over at Dev Home Sample Configurations.

@johlju
Copy link

johlju commented Oct 15, 2023

I have no knowledge of how the configuration file mentioned above is used and where the source for Microsoft.SqlServerDsc/SqlServerFeature is comig from. Please provide more details. But I know it is not possible to enable features post-install, other than running install again with the correct arguments. The manifest Microsoft.SQLServer.2022.Developer.installer.yaml does not seem to have any argument options at all? A manifest needs to handle all of these arguments in a real scenario: https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt

There is DSC resource SqlSetup that can install SQL Server: https://github.com/dsccommunity/SqlServerDsc/wiki/SqlSetup

There are a command (Install-SqlDscServer) in SqlServerDsc that can install SQL Server using PowerShell (see comment-based help for docs, there are no community docs as of yet). The source: https://github.com/dsccommunity/SqlServerDsc/blob/main/source/Public/Install-SqlDscServer.ps1

Not sure if this helps anything.

@johlju
Copy link

johlju commented Oct 15, 2023

There is also a new DSC resource in the works that better work with the latests SQL Server (support more options): dsccommunity/SqlServerDsc#1912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Configure Issue related to WinGet Configuration Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

4 participants