Service Virtualization

 View Only
  • 1.  How to achieve JDBC Connection with Windows Authentication in test case?

    Posted Jun 20, 2019 06:37 AM
    Hi,
    I am trying to perform JDBC validation in my test cases. I am able to successful do it with JDBC connection with SQL Server Authentication. 
    But some of my data base have only Windows Authentication, for which I am not sure how to do. 
    Kindly let me know, how to achieve this?

    Below is the driver and query string I used. 
    {{JDBCDriverName="com.microsoft.sqlserver.jdbc.SQLServerDriver"}}
    {{JDBCConnString="jdbc:sqlserver://<<ServerName>>:1433;databaseName=<<DBName>>"}}

    Thanks,
    Senthilnathan. S


  • 2.  RE: How to achieve JDBC Connection with Windows Authentication in test case?
    Best Answer

    Posted Jun 20, 2019 08:29 AM

    Adding integratedSecurity=true should do the trick.

     

    {{JDBCConnString="jdbc:sqlserver://<<ServerName>>:1433;databaseName=<<DBName>>;integratedSecurity=true"}}

     

    Be aware that it is the account that runs the simulator process which will be used to authenticate. If you're doing this from workstation then it is yourself, but for a serverside simulator it is often a technical account.

     

    Cheers,

    Danny

     

    ::DISCLAIMER::
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





  • 3.  RE: How to achieve JDBC Connection with Windows Authentication in test case?

    Broadcom Employee
    Posted Jun 20, 2019 09:03 AM
    Just to add to the Great response by ever reliable Danny, here are few things that you should take care of:

    1. Make sure, you keep the file sqljdbc_auth.dll at LISA_HOME/jre/bin folder. You get this DLL when you download the SQL JDBC Driver, unzip it and you would find the DLL in auth folder of your JDBC driver.

    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------