Here are the steps to configure VDS to connect to SQL Server using integrated windows authentication:
(Only works if VDS is installed on a Windows server).
1) Download the latest version of the Microsoft JDBC Driver 4.0 for SQL Server:
http://www.microsoft.com/en-us/download/details.aspx?id=11774
2) Execute the installer and unpack the files on the machine where VDS is installed.
Copy the sqljdbc4.jar file to %RLI_HOME%\lib\jdbc.
If this driver is already in the folder, replace the old one. If the new driver has a different name (e.g. sqljdbc42.jar), delete the old jar (sqljdbc4.jar) and add the new one (e.g. sqljdbc42.jar).
If the file is locked and cannot be replaced or deleted, run. <RLI_HOME>/bin/advanced/stop_servers.bat and once all servers are stopped, try replacing or deleting the file again.
3) Make sure that the machine where VDS is installed is part of the same domain or forest than the SQL server.
Add the server to the domain and reboot (if not part of the domain already).
4) Update the windows system path (PATH environment variable) to include the 64 bits dll that can be found in.
<SQL server JDBC driver install dir>\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x64
The file name is: sqljdbc_auth.dll
NOTE: For Version 7 and above copy sqljdbc_auth.dll to RLI_HOME\jdk\jre\bin\.
You need to add the folder in which the DLL is located at the end of the path variable:
ex: <other directories>;C:\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x64
5) If you run VDS and the VDS management console as services (default in VDS 6.0.x),
you will have to change the Log on user from Local System to the domain user that has access to the SQL server.
You need to change it for the 2 services: RadiantOne VDS Management Console. (vds_server_mgmt_console) and RadiantOne VDS (vds_server).
This domain user should also be part of the local administrators group on the machine in order for VDS to function properly.
If you don't run VDS and the VDS Control Panel as services, when you connect to SQL Server through VDS, VDS will authenticate to SQL Server as the windows logged in user.
6) VDS Datasource
Create a Database datasource in VDS.
Select Microsoft SQL Server as the type.
Driver class name is : com.microsoft.sqlserver.jdbc.SQLServerDriver
Add this property to the URL: integratedSecurity=true
You don't need to specify user and password as they are not used.
Example of JDBC URL:
jdbc:sqlserver://mysqlserver:1433;DatabaseName=AdventureWorks2012;SelectMethod=cursor;sendStringParametersAsUnicode=false;integratedSecurity=true
That's the last step.
If you are able to test the connection successfully, it means that the datasource is properly configured.
You can create a new proxy branch in VDS using this data source to check that it is working as expected.
NOTE - if you need to use the new data source in Context Builder you must update the classpath for the new jar file as shown below.
To delete the default SQL Server Jar file from the Context Builder classpath:
C:\radiantone\vds\bin>contextclasspath.bat delete C:\temp\sqldriverdelete.txt
An example of the contents of sqldriverdelete.txt is shown below:
external:$RLI_HOME$/lib/jdbc/sqljdbc4.jar
Print the classpath to make sure sqljdbc4.jar is no longer there:
C:\radiantone\vds\bin>contextclasspath.bat print
To add the new SQL Server jar file to the Context Builder classpath:
C:\radiantone\vds\bin>contextclasspath.bat add C:\temp\sqldriveradd.txt
An example of the contents of sqldriveradd.txt is shown below:
external:$RLI_HOME$/lib/jdbc/sqljdbc42.jar
Print the classpath to make sure sqljdbc42.jar has been added:
C:\radiantone\vds\bin>contextclasspath.bat print
Restart Context Builder.
NOTE - if you need to use the new data source in ICS Console you must update the classpath for the new jar file as shown below.
To delete the default SQL Server Jar file from the ICS Console classpath:
C:\radiantone\vds\bin>icspluginclasspath.bat delete C:\temp\sqldriverdelete.txt
An example of the contents of sqldriverdelete.txt is shown below:
external:$RLI_HOME$/lib/jdbc/sqljdbc4.jar
Print the classpath to make sure sqljdbc4.jar is no longer there:
C:\radiantone\vds\bin>icspluginclasspath.bat print
To add the new SQL Server jar file to the ICS Console classpath:
C:\radiantone\vds\bin>icspluginclasspath.bat add C:\temp\sqldriveradd.txt
An example of the contents of sqldriveradd.txt is shown below:
external:$RLI_HOME$/lib/jdbc/sqljdbc42.jar
Print the classpath to make sure sqljdbc42.jar has been added:
C:\radiantone\vds\bin>icspluginclasspath.bat print
Restart ICS Console.
----
Limitation:
If you have multiple Microsoft SQL servers backends that are not in the same AD forest, you won't be able to use integrated windows authentication to connect to all the SQL Servers unless there is a domain/forest trust in place & the domain account being used by the VDS service has the correct permissions.
Comments
Hi Aashik,
Is there a way to implement Integrated windows authentication with SQL server and VDS 7.4.7+ on linux servers?
Thanks,
Sai
Hey Sai,
That's a great question. I happened to migrate this KB article from our older KB portal and this was last tested in late v7.2/early v7.3 versions for a customer use-case by a different engineer.
The Microsoft driver versions have updated since then but I don't think anything much has changed on the FID side on how we connect to the MS-SQL database. I am fairly certain that FID running on Linux or Windows should not really matter.
Please do try the same and if by any chance you are not able to get it to work, please do raise a support ticket with us so that we can explore/test further.
Thanks,
Please sign in to leave a comment.