【问题标题】:"Integrated Security not supported" in google apps script jdbc connection谷歌应用程序脚本 jdbc 连接中的“不支持集成安全性”
【发布时间】:2019-08-23 23:00:11
【问题描述】:

我正在尝试使用 JDBC 函数通过 Google Apps 脚本连接到我的 MS-SQL DB。 我们使用 Windows 集成安全性,但是当我尝试使用此参数连接时,我收到一条错误消息,指出它不受支持。

我已经尝试提供我的 Windows 凭据并使用参数“IntegratedSecurity=true”但无法连接,尝试使用服务器 IP 和名称但也不起作用。

var address = 'serverIP'; //ex. '10.1.1.1:1433'
var user = ';username=username';
var userPwd = ';password=password';
var db = 'dbname';

var dbUrl = 'jdbc:sqlserver://' + address + ';databaseName=' + db;

function readData() {

  var conn = Jdbc.getConnection(dbUrl,user,userPwd);

}

我也试过这种形式:

var conn = Jdbc.getConnection("jdbc:sqlserver://MyServerIP:1433;databaseName=DBName;integratedSecurity=true");

它应该连接到服务器,但我得到的只是错误

错误是

第一种形式:

"无法连接到数据库。请检查连接字符串, 用户名和密码。 (第 12 行,文件“代码”)”

第二种形式:

"以下连接属性不 支持:集成安全。 (第 13 行,文件“代码”)”

【问题讨论】:

  • “我得到的只是错误” 然后分享这些错误。 :)
  • 对不起,我已经分享了错误

标签: sql-server google-apps-script


【解决方案1】:

在非 Windows 平台上使用 Windows 集成身份验证的说明如下:Using Kerberos integrated authentication to connect to SQL Server 在 Windows 上,您还有一个使用平台 .dll 的附加选项,如下所述:Connecting with integrated authentication On Windows

我不知道其中任何一个在“Google Apps 脚本”中是否可行。

【讨论】:

  • 嗨大卫!感谢您的回答,但我认为任何链接都不适用于我的案例,GAS(Google Apps 脚本developers.google.com/apps-script)它是一种与 javascript 非常相似的语言,用于 google 应用程序(如工作表、文档等)。 .
猜你喜欢
  • 1970-01-01
  • 2018-08-19
  • 1970-01-01
  • 1970-01-01
  • 2011-06-05
  • 1970-01-01
  • 1970-01-01
  • 2021-10-30
相关资源
最近更新 更多