You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi ,
I need help to connect OracleDB which is present on server by using Bitbucket pipeline. Can anyone help on this , how to connect Oracle DB with pipeline and prerequisites needed to be installed on Bitbucket Cloud.
In Local machine, I followed JDBC Connection to connect oracle DB present on the server. It is executed successfully and retrieved.
Local Machine Script:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class DbAll {
public static void main(String[] args) {
try{
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection cn=DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521/DBName","username","password");
Statement smt=cn.createStatement();
//query to display 10 records from table employee
String q="select Col1,Col2,Col3 from oe_order_headers_all where rownum<11";
//to execute query
ResultSet rs=smt.executeQuery(q);
//to print the resultset on console
if(rs.next()){
do{
System.out.println(rs.getString(1)+","+rs.getString(2)+","+rs.getString(3));
}while(rs.next());
}
else{
System.out.println("Record Not Found...");
}
cn.close();
}
catch(Exception e){
System.out.println(e);
}
}
}
Note:
1. Same script can i use in bitbucket pipeline , can anyone suggest on this?.
2. Any .jar file or other script is there to connect from JDBC to OracleDb
3. It is possible to execute java files in bitbucket pipeline