Forum Discussion

abbas's avatar
abbas
Occasional Contributor
9 years ago

Connection to an Oracle database without CID, but with Servicename

Hi everybody, I cann't configure the connection to Oracle database, because there is no CID. I must configure it just with servicename! Thanks for your support. Abbas
  • Hello Abbas,

     

    The connection string templates in R!API are customizable. You can edit them on the "JDBC drivers" tab in preferences.

     

    In your case, I guess, you need to replace 

    jdbc:oracle:thin:<USER>/<PASSWORD>@<HOST:127.0.0.1>:<PORT:1521>:<SID>

    with

    jdbc:oracle:thin:<USER>/<PASSWORD>@<HOST:127.0.0.1>:<PORT:1521>/SERVICE

    where instead of "SERVICE" you need to provide your real service name (e.g. "orcl").

     

     

    • abbas's avatar
      abbas
      Occasional Contributor

      Thank you for this message, but I tried it and got the following error:

      Failed to init connection for driver [oracle.jdbc.driver.OracleDriver], connectionString [jdbc:oracle:thin:/@:1521/SHOPTEST]

       

      !!!

      Cheers

      Abbas

       

      • MFagerlind's avatar
        MFagerlind
        Staff

        The error message seems to indicate that the host name is missing in the connection string. Did you delete it by accident?

         

        Did you use Nathalie's approach or the one I suggested?

         

        Regards,

        Manne

    • dd1984's avatar
      dd1984
      Occasional Contributor

      Hi,

       

      thank you !!!!! It's working  :)

       

      Your solution is working for me but it's limiting me to test one database only. I have multiple environments and different service name for each data base.

       

      Please suggest how to manage that.

       

      Best regards,

  • You probably want to go with Nathalie's advice above, but if you want to change the Connection string for just one JDBC request, you could change the Configuration Connection to <None>. This will make the Connection string, Driver and password fields editable.

     

    Regards,

    Manne, Developer