Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

Ability to automate installation for linux driver

The RPM package is very helpful when attempting to install the Linux driver for SQL Server/ADW from multiple boxes. However, the requirement of accepting the EULA doesn't facilitate the use of configuration management tools such as CHEF and Puppet. Please remove the EULA agreement requirement to allow for automated installation of this software.

4 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    AdminMicrosoft SQL Server (Admin, Microsoft Azure) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    under review  ·  AdminMicrosoft SQL Server (Admin, Microsoft Azure) responded  · 

    Upvotes: 4

    <=-=May 30 2017 3:46AM=-=>

    This also applies to the Debian packaging, where the way the packages verify EULA acceptance prevents us from automating their unattended installation.

    Whilst Microsoft seem to correctly set the debconf options to indicate that the EULA has been accepted, they do not check for the values on the initial installation (and possibly on upgrades — I’ve not checked).

    Since the source code for the packages doesn’t appear to have been released, I am unable to provide a patch. Hopefully these directions are useful for troubleshooting. See the following instructions to obtain the offending file:

    $ curl -o msodbcsql_13.1.7.0-1_amd64.deb https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/msodbcsql/msodbcsql_13.1.7.0-1_amd64.deb
    $ dpkg-deb —raw-extract msodbcsql_13.1.7.0-1_amd64.deb msodbcsql
    $ cd msodbsql/
    $ cat DEBIAN/preinst

    The check_eula_acceptance() function here should check that a selection for the msodbcsql/accept_eula configuration option has not already been made. I’m also not sure you should be altering the seen value.

    This allows those of us with automated deployment environments (on Azure ;-) ) the ability to pre-accept the license as follows:

    $ echo “msodbcsql msodbcsql/accept_eula select true” | sudo debconf-set-selections
    $ sudo apt-get install -y msodbcsql

    <=-=Jun 12 2017 2:57PM=-=>

    Feedback noted. We will look into it.

    In the meanwhile can you try the following for unattended install?

    sudo ACCEPT_EULA=Y yum install msodbcsql

    5 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Anonymous commented  ·   ·  Flag as inappropriate

        So I've got an update for my post from yesterday, as I found a solution after quite some time. At least for saltstack, but I'm sure it can be adopted by any puppet, chef or ansible expert.

        So to give this a short history, the "problem" is, that there is a standard for "answer-files" for deb packages called debconf. This answers can be made visible AFTER the setup, so you can automate future setups:

        apt install msodbcsql17
        debconf-get-selections | grep -i mso
        sodbcsql17 msodbcsql/accept_eula boolean true

        Sadly the deb package ingores those settings, which is the reason @markus kuhn and @Jan Katins posted updated github links.
        As this wasn't considered by Microsoft, I dug into the original file and search for the behavior. In the deb file is a file called "preinst". It has a function which starts with the following IF function:

        #!/bin/bash -e
        check_eula_acceptance() {
        if [ "$ACCEPT_EULA" != "y" ] && [ "$ACCEPT_EULA" != "Y" ]; then

        As you can see, nobody (seems to) care about debconf, but checks the value of a BASH variable. This led me to the conclusion, that an environment variable could solve the issue.

        Accept Microsoft Eula:
        environ.setenv:
        - name: ACCEPT_EULA
        - value: Y

        Which solves the unattended package install state for salt:

        msodbcsql17:
        pkg.installed:
        - require:
        - sls: microsoft.repo
        - environ: Accept Microsoft Eula

      • Anonymous commented  ·   ·  Flag as inappropriate

        So will this be solved sometimes in the future? I'm currently trying to deploy this via saltstack, and the driver just doesn't accept the 'debconf' settings.
        > So we end up with an `exec` kludge workaround
        This!

        Accept Microsoft Eula:
        debconf.set:
        - name: msodbcsql17
        - data:
        'msodbcsql/accept_eula': {'type': 'boolean', 'value': True }

        msodbcsql17:
        pkg.installed:
        - require:
        - debconf: Accept Microsoft Eula
        - sls: microsoft.repo

      Feedback and Knowledge Base