Question

5
Replies
1045
Views
PrakashP6773 Member since 2016 1 post
WellsFargo
Posted: 2 years ago
Last activity: 1 year 11 months ago
Closed

Connecting SQL server with windows authentication

hello,

Am trying to connect SQL server , which is installed and accept only windows authentication . am creating Database rule by following connection type as use JDBC URL listed below , the JDBC URL às jdbc:sqlserver://HostName :PortNo;databaseName=DBname;integratedSecurity=true;

And provided Username and password then tested the connection .

before that i did configuration as below

Server configurations:

JDBC connection Driver sqljdbc42.jar at <TOMCAT-INSTALLATION>/ lib folder.

tomcat\Tomcat 8.5\webapps\prweb\WEB-INF\classes prConfig.xml file added below tags for connection .

<env name="database/drivers" value=" com.microsoft.sqlserver.jdbc.SQLServerDriver; />

<env value="D:/apps/tomcat/Tomcat 8.5/lib/sqljdbc42.jar" name="compiler/defaultPaths"/>

Encountered a problem stating below :

Problem encountered when getting a database connection: code: 0 SQLState: 08S01 Message: This driver is not configured for integrated authentication. ClientConnectionId:e9bd6d87-7ecd-4e93-bb06-6739db3e45ee DatabaseException caused by prior exception: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:e9bd6d87-7ecd-4e93-bb06-6739db3e45ee | SQL Code: 0 | SQL State: 08S01

Resolved the above issue by configuring/ placed the sqljdbc_auth.dll from Microsoft. In class path <TOMCAT-INSTALLATION>/ bin folder .

this time caught with below error .

Status Value: Problem encountered when getting a database connection: code: 18456 SQLState: S0001 Message: Login failed for user 'somegroup/SERVERNAME. ClientConnectionId:481c0a90-766a-45c1-8dba-e6bed6f2b135 DatabaseException caused by prior exception: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'somegroup/SERVERNAME'. ClientConnectionId:481c0a90-766a-45c1-8dba-e6bed6f2b135 | SQL Code: 18456 | SQL State: S0001

integratedSecurity=true/false/SSIP and trustedConnection=yes; securedMethod=cursor ; and authentication=SqlPassword etc.

Also tried passing DB username/password in URL still we are getting the same error .

another scenario

Created database rule by following connection type as use Configuration in preferences

modified prConfig.xml file added below tags and covered most of the scenarios still same errors showed above highlighted .

<env name="database/databases/DBName/url" value="jdbc:sqlserver://HostName :PortNo;databaseName=DBName;integratedSecurity=true;securedMethod=cursor />

<env name="database/databases/DBName/userName" value="XXXXXXXX" />

<env name="database/databases/DBName/password" value="XXXXXX" />

Is it possible to connet SQL server which is intalled remotly and while installing SQL server configured as Windows authentication for connections.

can some one help me on this .

Data Integration
Moderation Team has archived post
Share this page LinkedIn