Skip to content

Latest commit

 

History

History
97 lines (66 loc) · 2.19 KB

File metadata and controls

97 lines (66 loc) · 2.19 KB
title Install SQL Server Tools on Linux - SQL Server vNext | Microsoft Docs
description This topic describes how to install the SQL Server Tools on Linux.
author rothja
ms.author jroth
manager jhubbard
ms.date 12/16/2016
ms.topic article
ms.prod sql-linux
ms.technology database-engine
ms.assetid eff8e226-185f-46d4-a3e3-e18b7a439e63

Install SQL Server tools on Linux

The following steps install the command-line tools, Microsoft ODBC drivers, and their dependencies. The mssql-tools package contains:

  • sqlcmd: Command-line query utility.
  • bcp: Bulk import-export utility.

Install the tools for your platform:

  1. Enter superuser mode.

    sudo su
    
  2. Download the Microsoft Red Hat repository configuration file.

    curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
  3. Exit superuser mode.

    exit
  4. Run the following commands to install mssql-tools.

    sudo yum install mssql-tools
  1. Import the public repository GPG keys:

    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  2. Register the Microsoft Ubuntu repository:

    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
  3. Update the sources list and run the installation command:

    sudo apt-get update 
    sudo apt-get install mssql-tools

Sqlcmd and bcp are not available on macOS.

Use sql-cli from macOS. For more information, see sql-cli.

Next steps

After installation, connect to the SQL Server instance to create and manage databases. To get started, see Connect and query SQL Server on Linux.