Forum Discussion

pandian66's avatar
pandian66
Occasional Contributor
8 years ago

Not able to connect to Oracle from DataSource with type as JDBC

Getting the following error , when connecting to oracle DB in DataSource Step but its all good if I connect through Toad   Can't get the Connection for specified properties; java.sql.SQLException: ...
  • richie's avatar
    8 years ago

    Ok - this is me trying to help cos of my Oracle experience, NOT SoapUI experience - Its been 4 years since I connected SoapUI to an Oracle database - I haven't got an Oracle DB to connect at moment and I haven't got the space on my harddrive to install the personal edition to check

     

    The database you are trying to connect to doesnt use an SID, it's the Service Name that is specified in your config and the 2 are not equivalent.

     

    SID is a single unique instance name (not the db name) whereas Service name can be an alias to multiple db instances.

     

    you need to play with the JDBC connection string slightly - if I remember correctly the SID was separated by a colon, 'I think' the service name was separated by an oblique (/) - also the earlier part of the connection string might be a little different to the SID connection string - I just can't remember its been so long since I did this.

     

    Easiest way to check?  Try using the thin driver's connection string (rather than connecting to the db via the tnsnames.ora file) in Toad (there should be a thin driver connection option - although I can't remember if TOAD automatically picks up the tnsnames.ora file - if its local I think it does, if the file's remote it won't.

     

    Worst case - download DBVisualiser or something like that, that definitely can use a connection string rather than the tnsnames.ora file.

     

    Hope this helps,

     

    Cheers

  • pandian66's avatar
    8 years ago

    Richie and Rao , thanks for your follow-up, really appreciate your help.

     

    Rao , I am able to connect thru Toad.

     

    I was able to talk to my DB team and get the SID value for the DB being used and changed the connection string to use the SID value instead of the Service_name and now the connection is established

     

    So we can consider this issue as closed now

     

    Thanks

    Pandian