Forum Discussion

Grafische_bedri's avatar
Grafische_bedri
New Contributor
14 years ago

MSSQL 2008r2 database connection in Pro w. windows security

Hi!

(I've posted this question in the other section of the board as well, which was before I found out we have a Pro support login)

I'd like to ask a question regarding connecting to a MSSQL 2008r2 database with SoapUI Pro. (I couldn't find a subject on this forum regarding this topic, so I'm opening a new one). I've tried this by using the following driver/connection information:
MSSQL(2008r2)/com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:sqlserver://<HOST:*hostname*>:<PORT:1433>;databaseName=<DB:*dbname*>;user=<USER>;password=<PASSWORD>;

When I now try to connect to the database in a Datasource step in a testcase, it doesn't seem to be able to connect. I've tried to connect by using a Groovy script (in SoapUI free version) and it took me a while, but I got it working by using the jtds driver (
Sql.newInstance("jdbc:jtds:sqlserver://HOST/DATABASE;domain=DOMAIN", "USER", "PASSWORD", "net.sourceforge.jtds.jdbc.Driver")
).

Obviously, I hoped Pro would solve this problem by using a project overall JDBS-connection, but as mentioned above, this won't work. I also tried installing the jtds drivers and using the jtds connection string in the JDBC connections setup, but this won't work either.

Any suggestions? Could windows security/authentication on the SQL Server have anything to do with this?

Thanks!

Regards,
Jeroen.
  • Hi,

    THanks for your reply.

    The error I get is:
    Can't get the Connection for specified properties; com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'USERNAME'.


    However, I did manage to work around the security issue by using an ODBC link instead by setting up a database connection using:
    Driver: MSSQL(ODBC)//com.microsoft.sqlserver.jdbc.SQLServerDriver
    Connection String template: jdbc:odbc:<ODBC-link-name>

    Regards,
    Jeroen.