cancel
Showing results for 
Search instead for 
Did you mean: 

MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver

Highlighted
Contributor

MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver

I tried to add a new Connection String Template for 

MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver

 

I tried using a different Driver name:

MSSQL(MicrosoftDriver - uniquenamehere)/com.microsoft.sqlserver.jdbc.SQLServerDriver

 

Connection Connection String Template

jdbc:sqlserver://<HOST>:<PORT:1433>;databaseName=<DB>;IntegratedSecurity=true

 

But Ready API warns I may break the current driver so I backed out from making the change.

 

What is the correct way to do this?

 

I can edit the connection string manually which works, but I would like to have 2 templates available to me if possible:

jdbc:sqlserver://<HOST>:<PORT:1433>;databaseName=<DB>;IntegratedSecurity=true

jdbc:sqlserver://<HOST:127.0.0.1>:<PORT:1433>;databaseName=<DB>;user=<USER>;password=<PASSWORD>

 

 

 

I have the following files in place

\ReadyAPI-2.7.0\bin\ext\mssql-jdbc-8.4.1.jre8.jar

\ReadyAPI-2.7.0\bin\mssql-jdbc_auth-8.4.1.x64.dll

5 REPLIES 5
Highlighted
Community Hero

Re: MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver

Hey @mrdwprice 

 

Can you clarify a bit  - where does ReadyAPI! give you the warning?

 

Reason I ask is that I've just added in another row to my JDBC preferences which corresponds to your second jdbc url.  I already have a SQLServer connection setup and I didn't get any problems?

 

The db driver .jars are registered as REadyAPI! boots - but you don't link them to a specfic row in that JDBC Config preferences -  just to be clear - the name you specify in the 'Driver' editable field when creating a new connection - you could call the driver name 'Steve' and it would work - admittedly that was for a different database using a different JDBC driver file with different setup.

 

So -  I've just looked  in the .jar file and there is a 'java.sql.Driver' file that contains the value 'com.microsoft.sqlserver.jdbc.SQLServerDriver' so I thought maybe this was the problem

 

HOWEVER - I changed the name of the 'Driver' field for my SQLServer connection - first I changed it to 

MSSQL(MicrosoftDriver2)/com.microsoft.sqlserver.jdbc.SQLServerDriver, then I ran a query using the driver and it worked fine.

 

I then changed the value again to MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver2, then I ran a query using the driver and it worked fine.

 

From the evidence above - I'd just add in an extra entry into the JDBC config, the second one with a Driver value of MSSQL(MicrosoftDriver2)/com.microsoft.sqlserver.jdbc.SQLServerDriver and the connection url of 

jdbc:sqlserver://<HOST>:<PORT:1433>;databaseName=<DB>;IntegratedSecurity=true

 

However - youre saying this wont work.

 

So, can you clarify where you get the warning?  I've tried reproducing but I can't

 

Cheers

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Contributor

Re: MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver

Thanks very much for the reply. These are the steps I'm doing:

 

File>Preferences>JDBC Drivers

 

Click the green + icon

 

Add Driver name:
MSSQL(MicrosoftDriver - uniquenamehere)/com.microsoft.sqlserver.jdbc.SQLServerDriver

 

Add Connection String template:
jdbc:sqlserver://<HOST>:<PORT:1433>;databaseName=<DB>;IntegratedSecurity=true

 

Click OK

 

The following warning is given:

"The existing database connections may be damaged by these changes.
Are you sure you want to change the selected driver's template?"

Highlighted
Community Hero

Re: MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver

hey @mrdwprice 

 

what version of readyapi! are you running?

 

i'm on v3.4.0

 

ta

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Contributor

Re: MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver

I have tested on 2.7.0 and on 3.4.0 (same ReadyAPI project file). I get the same on both.

 

The Project has lots of existing connections that use this template:
jdbc:sqlserver://<HOST:127.0.0.1>:<PORT:1433>;databaseName=<DB>;user=<USER>;password=<PASSWORD>

 

These connections over time will be migrated to use Integrated Security instead: 
jdbc:sqlserver://<HOST>:<PORT:1433>;databaseName=<DB>;IntegratedSecurity=true

 

I was hoping to have 2 Connection String Template's for the same driver during this migration process.

Highlighted
Community Hero

Re: MSSQL(MicrosoftDriver)/com.microsoft.sqlserver.jdbc.SQLServerDriver

Hey @mrdwprice,

I appreciate your situation i just dont understand why youre getting the warning when i dont.

As i said before...i cant reproduce what youre doing.

Can you reset to readyapi! defaults jdbc settings and then run through exactly what youre doing step by step? I think thats the only way to nail this down as i cant get the warning you get and we're working on the same version.

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors