【问题标题】:Access sqlserver from command line under linux debianlinux debian下命令行访问sql server
【发布时间】:2016-07-05 08:16:35
【问题描述】:

我需要从 linux 环境自动化 sqlserver 脚本。 我看到微软发布了它的 ODBC 驱动程序的 linux 版本,其中还包括 sqlcmd for linux。不过,它仅适用于 redhat。

我找到了一些教程来强制在其他几个 linux 版本(包括 debian)上安装,但它们似乎已经过时了:很多点是错误的,或者 - 可能 - 不再适合了。

我也尝试安装和运行 sqsh,但尝试连接时出错,并且错过了帮助配置它的指南

sqsh -S xy.zk.lm.opqr -U sas -D myDB
sqsh-2.1.7 Copyright (C) 1995-2001 Scott C. Gray
Portions Copyright (C) 2004-2010 Michael Peppler
This is free software with ABSOLUTELY NO WARRANTY
For more information type '\warranty'
Password: ... 
Msg 18456, Level 14, State 1
Server 'AUB-DB-QUALIF\SQLEXPRESS', Line 1
▒chec de l'ouverture de session de l'utilisateur▒'sas'.
Open Client Message
Layer 0, Origin 0, Severity 78, Number 34
Adaptive Server connection failed

由于我错过了使用 linux 的技能,我可能看不到“显而易见”的方法。因此,如果您有任何最新的提示或技巧来帮助在 linux 下将 sqlserver 作为命令行运行,我会非常关注您!

提前致谢。

【问题讨论】:

标签: sql-server bash debian odbc


【解决方案1】:

今天 2016 年 11 月 17 日,Microsoft 发布了 SQLServer for Linux 的公共预览版(支持 Linux、Mac、Docker 等),您可以使用任何具有 SQLCMD 优势的新版本。

SQL Server for Linux

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多