Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 1.9 KB

odbc-sles.md

File metadata and controls

70 lines (50 loc) · 1.9 KB
author ms.author ms.date ms.service ms.topic ms.custom
rwestMSFT
randolphwest
07/22/2024
sql
include
linux-related-content

Use the following steps to install the mssql-tools18 on SUSE Linux Enterprise Server.

  1. Import the Microsoft package signing key.

    curl -O https://packages.microsoft.com/keys/microsoft.asc
    sudo rpm --import microsoft.asc
  2. Add the [!INCLUDE ssnoversion-md] repository to Zypper.

    • For SLES 15, use the following command:

      sudo zypper ar https://packages.microsoft.com/config/sles/15/prod.repo
    • For SLES 12, use the following command:

      sudo zypper ar https://packages.microsoft.com/config/sles/12/prod.repo
  3. Install mssql-tools18 with the unixODBC developer package.

    • For SLES 15, use the following command:
    sudo zypper install -y mssql-tools18 unixODBC-devel glibc-locale-base
    • For SLES 12, use the following command:
    sudo zypper install -y mssql-tools18 unixODBC-devel

    To update to the latest version of mssql-tools18, run the following commands:

    sudo zypper refresh
    sudo zypper update mssql-tools18
  4. Optional: Add /opt/mssql-tools18/bin/ to your PATH environment variable in a bash shell.

    To make sqlcmd and bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file with the following command:

    echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bash_profile
    source ~/.bash_profile

    To make sqlcmd or bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file with the following command:

    echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
    source ~/.bashrc