Forum Discussion

zhorvatic's avatar
zhorvatic
Occasional Contributor
8 years ago

JDBC connections with Instanced database names in NG PRO

Can somebody explain how to configure a database connection for a database that is hosted on:

server\instanceName

 

 In free version I could make a connection with ease, however in pro version I cannot do it so far.

 

jdbc:sqlserver://serverName;instanceName=sqlInstanceName;databaseName=XYZ;user=X;password=PASS_VALUE

 

using this exact same syntax in database configurator I get an error saying that it cannot connect.. and it also forces a port 1433 in the connection string

 

Also, 

using old test cases with such syntax, I can connect to a database and all jdbc requests can be run, but trying to edit the said connections gives an error "Connection string does not match Connection URL template"

 

EDIT:

I've narrowed the problem to the connection configuration wizard forcing me to use a specific TCP/IP port for the instance to operate on, which we do not have set up and we use a dynamic address for that instance.

 

So the next question is, how do I circumvent the need of this software to force the port number in the connection string?

 

Mind you, without using the port, the connection can be established.. but I cannot configure environments and connection strings without it -.-

 

 

 

  • I've managed to solve the problem by changing the database connection template in Preferences -> JDBC Drivers section.

     

    Driver:

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

     

    Template:

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

     

     

    I just removed the <PORT:1433> section of the template and it allowed me to connect and set up my connections as I need them to.

     

  • zhorvatic's avatar
    zhorvatic
    Occasional Contributor

    I've managed to solve the problem by changing the database connection template in Preferences -> JDBC Drivers section.

     

    Driver:

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

     

    Template:

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

     

     

    I just removed the <PORT:1433> section of the template and it allowed me to connect and set up my connections as I need them to.

     

  • ByronJ's avatar
    ByronJ
    Occasional Contributor

    Have you got the sql connector jar in your bin/ext folder?

     

    If you added it recently, have you restarted ready!api/soapUI pro since?

     

    Do you need to tunnel to get to the database?

    • zhorvatic's avatar
      zhorvatic
      Occasional Contributor

      Yes, normal connection towards non-instanced server and database is established easily.

       

      There's no tunneling involved, it's a direct connection to a database server.