使用 bash 脚本连接到远程 SQL Server [英] Using bash script to connect to remote SQL Server

查看:27
本文介绍了使用 bash 脚本连接到远程 SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们公司在另一个国家有一个数据库(SQL Server).我有数据库的主机名、用户名和密码.我想通过 bash shell 从数据库中提取数据并将它们放入本地文件中.我该怎么做?

Our company has a db (SQL Server) in another country. I have the host name, username and the password of the db. I want to extract data from the database through bash shell and put them into local file. How can I do that?

推荐答案

安装 FreeTDS.配置完成后,您将能够使用 tsql 从 bash 查询 SQL Server.

Install FreeTDS. Once configured you'll be able to use tsql to query SQL Server from bash.

这篇关于使用 bash 脚本连接到远程 SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆