title: Connect Oracle cloud Database using JDBC java
body: <p>I have database username and password to access oracle db and also have service url like <a href="https://X-X.X.X.oraclecloudapps.com/apex/" rel="nofollow">https://X-X.X.X.oraclecloudapps.com/apex/</a>.</p>
  
  <p>Can anybody know how to connect this db using JDBC connection.</p>
  
  <p>I tried using oracle thin driver but somehow it failes.
  Sample java code: </p>
  
  <pre><code>Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//X.X.X.X.oraclecloudapps.com:1521/sid", "username", "****");
  </code></pre>
  
  <p>It throws</p>
  
  <pre><code>Exception in thread "main" java.sql.SQLRecoverableException: Io exception: The Network Adapter could not establish the connection
  </code></pre>
  
  <p>I don't know SID here, it would be helpful if anybody give steps to find SID/ServiceName from Oracle Cloud dashboard.</p>