简体   繁体   English

使用jdbc从Mule登录到SQL Server时无法打开数据库错误

[英]Cannot open database error when logging into SQL server from Mule using jdbc

I have setup the generic database configuration in Mule and have set the JDBC connection string to 我已经在Mule中设置了通用数据库配置,并将JDBC连接字符串设置为

jdbc:sqlserver:// ${db.host};databaseName=${db.name};user=${db.user};password=${db.password};integratedSecurity=true;

The database requires Windows Authentication which is different to my own personal windows login so the db.user value is set to DOMAIN\\\\userId and I have added the auth dll file to the native library of the SQL Server jar in the build path. 该数据库需要Windows身份验证,这不同于我自己的个人Windows登录名,因此db.user值设置为DOMAIN \\\\ userId,并且我已将auth dll文件添加到了构建路径中的SQL Server jar的本机库中。

Java构建路径

It returns the error message below: 它返回以下错误消息:

测试连接失败

The password does contain special characters (!^#) but I can get a "Test successful" message when I test the connection without a database name in the jdbc connection string. 密码确实包含特殊字符(!^#),但是当我在jdbc连接字符串中没有数据库名称的情况下测试连接时,我会收到“测试成功”消息。

I can however login using the same credentials and access the database using SQL Management Studio. 但是,我可以使用相同的凭据登录并使用SQL Management Studio访问数据库。

Does anyone know what might be causing the issue? 有谁知道是什么原因造成的?

我不是MSSQL管理员,但是我有类似的东西并且它可以工作-也许您可以以某种方式使用它。

jdbc:sqlserver://{host}\{domain}:1433;databaseName={db.name};user={user};password={password}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM