Forum Discussion
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").
- abbas9 years agoOccasional 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
- MFagerlind9 years agoStaff
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
- nmrao9 years agoChampion Level 3Oracle Host name is missing in your case.
- abbas9 years agoOccasional Contributor
I used the following configuration:
Driver: OracleThin/oracle.jdbc.driver.OracleDriver
Connection String template: jdbc:oracle:thin:<catalog>/<catalog>@<HOST:10.7.1.50>:<PORT:1521>/SHOPTEST
and I have contact to the named database with SQL Developer, but I get the following error:
" Failed to init connection for driver [oracle.jdbc.driver.OracleDriver], connectionString [jdbc:oracle:thin:/@10.7.1.50:1521/SHOPTEST] "
What I did:
1- in config Coection String template like above
2- Database Configuration -->New
Driver: OracleThin/oracle.jdbc.driver.OracleDriver
Host: 10.7.1.50
Port: 1521
3: Click Test connection ---> Result: Erorr:
" Failed to init connection for driver [oracle.jdbc.driver.OracleDriver], connectionString [jdbc:oracle:thin:/@10.7.1.50:1521/SHOPTEST] "
- dd19849 years agoOccasional Contributor
Hi,
thank you TanyaGorbunova !!!!! 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,
- JKambli9 years agoStaff
If in a single Environment, if you use 1 database connection then on Databases tab > add 1 connection string.
http://readyapi.smartbear.com/readyapi/databases/start
Once you do that go to Environments > Add environment > JDBC connection > Edit the connection string for that environment.
- dd19849 years agoOccasional Contributor
Hi,
I tried that but it's over riding the value of connection string i used in Environments with the connection String in JDBC driver.
Here is the set up for oracle.jdbc.driver.OracleDriver
1.Under preferences used jdbc:oracle:thin:<username>/<pwd>:host:port/servicename --service name say sampleTest1.se
2.Created single database entry in Databases jdbc:oracle:thin:<username>/<pwd>:host:port/sampleTest1.se
3.Create a test environement test with database where service name is same as i setup in preferences >JDBC driver
jdbc:oracle:thin:<username>/<pwd>:host:port/sampleTest1.se --works fine
4.Create a test environement test 2 with database where service name is different say sampleTest2.se --being override with sampleTest1.se
So now service name in database string of 4th from above is being override by the service name i have used in 1st step above.
Please confirm if i missed anything.
Thank you!!
Related Content
- 5 years ago
- 8 years ago
Recent Discussions
- 22 days ago