debian安装sqlserver_在 Linux 上安装 SQL Server 命令行工具 - SQL Server | Microsoft Docs

在 Linux 上安装 sqlcmd 和 bcp SQL Server 命令行工具Install sqlcmd and bcp the SQL Server command-line tools on Linux

06/30/2020

本文内容

适用于:Applies to: SQL ServerSQL Server(所有支持的版本)SQL ServerSQL Server (all supported versions) - Linux适用于:Applies to: SQL ServerSQL Server(所有支持的版本)SQL ServerSQL Server (all supported versions) - Linux

通过以下步骤安装命令行工具、Microsoft ODBC 驱动程序及其依赖项。The following steps install the command-line tools, Microsoft ODBC drivers, and their dependencies. mssql-tools 包包含:The mssql-tools package contains:

sqlcmd:命令行查询实用工具。sqlcmd: Command-line query utility.

bcp:批量导入-导出实用工具。bcp: Bulk import-export utility.

为你的平台安装工具:Install the tools for your platform:

本文介绍如何安装命令行工具。This article describes how to install the command-line tools. 如果正在寻找有关如何使用 sqlcmd 或 bcp 的示例,请参阅本主题末尾的链接。If you are looking for examples of how to use sqlcmd or bcp, see the links at the end of this topic.

在 RHEL 8 上安装工具Install tools on RHEL 8

通过以下步骤在 Red Hat Enterprise Linux 上安装 mssql-tools。Use the following steps to install the mssql-tools on Red Hat Enterprise Linux.

进入超级用户模式。Enter superuser mode.

sudo su

下载 Microsoft Red Hat 存储库配置文件。Download the Microsoft Red Hat repository configuration file.

curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/msprod.repo

退出超级用户模式。Exit superuser mode.

exit

如果安装了早期版本的 mssql-tools,请删除所有旧的 unixODBC 包。If you had a previous version of mssql-tools installed, remove any older unixODBC packages.

sudo yum remove mssql-tools unixODBC-utf16-devel

运行以下命令,以使用 unixODBC 开发人员包安装 mssql-tools。Run the following commands to install mssql-tools with the unixODBC developer package.

sudo yum install mssql-tools unixODBC-devel

备注

若要将 mssql-tools 更新至最新版本,请运行以下命令:To update to the latest version of mssql-tools run the following commands:

sudo yum check-update

sudo yum update mssql-tools

可选:向 bash shell 中的 PATH 环境变量添加 /opt/mssql-tools/bin/。Optional: Add /opt/mssql-tools/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值