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

查看:181
本文介绍了使用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天全站免登陆