Forum Discussion

sprice090161's avatar
sprice090161
Contributor
8 years ago

How do create a JDBC SQL connection using Windows Authentication?

I am running in a new environment where SQL Server no longer requires a usr/psw per Database as I used to provide for a typical DB connection string. Our new company environment allows me read access to all of our databases using Windows Authentication.

 

For example, if I launch SQL server Management Studio It accepts my computers Window login with no password:

DomainName\User Name

 

And of course I have to supply the server, DB, and port...

 

If I attempt to create a connection string in my new JDBC Test Step and provide the same data it fails to connect to the database.

 

Do I have to explicitly tell soapUI that I want it to use Windows Authentication, and if so how do I do that?

I've searched the test step, the local configuration option, the top level connection string option, and preferences.

4 Replies

  • No the response isn't helpful.

     

    I followed the first link, placing the DLL in the bin directory and restarting soapUI. You didn't instruct me what to do, but I assumed that there would be a new driver but there is nothing new.

     

    The next two links don't seem relevant unless i'm missing something.

    The first link for the connection strings is littered with individual configuration. None of which seen to me connected to the dll.

    The last link is for setting up windows authentication to SQL Server management studio. I have that already. WhatI need to to configure a JDBC test step in SoapUI. 

      • sprice090161's avatar
        sprice090161
        Contributor

        PAULMS!!! Thank you :-)

        We need SMARTBEAR to incorporate this into the the online doc for setting UP JDBC connection. It's such a simple modification to the connection string. 

         

        The only comment that I would make for users going forward is to inform then that the default connection string will appear containing USR/Pswd for SQL Authentification, and that they simply need to replace that portion of the connection string with ";integratedSecurity=true".

         

        Thank you so much for your quick response.... 

         

        BUT....If you have already started with a JDBC test step and the connection string doesn't work, the app is little bit messy. First you can not edit the connection string as it is disabled. The user must go to the "DATABASE" Configuration to make the edit. I'm not sure how it saves, as I had to make the same edit a few times.

         

        One other thing that is definitely a bug. After you make the edit to the Database Configuration, and test the connection from there, Go to the JDBC test step and click test connection, it should still work. NExt under the "Configuration section, click the configure button, and notice that the "User" text box contains "ratedSecurity=true", the text got cut off, if you attempt to test the connection from there it will fail, and it will also go back and modify your DATABASE environment definition incorrectly. This is probably the issue I referred to earlier.

         

        The morel of hte story is, once you make the correct edit at the environment level, DO NOT open the connection for editing in the JDBC test step. I'll open a defect for this. Sorry about the long winded response but hopefully no one will get bit to badly. Your fix still works...