# JDBC Connectivity Issues

**URL:** https://discourse.julialang.org/t/jdbc-connectivity-issues/22358
**Category:** New to Julia
**Created:** [March 26, 2019, 4:02pm UTC](https://discourse.julialang.org/t/jdbc-connectivity-issues/22358 "2019-03-26T16:02:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alphasig329](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alphasig329/32/9794_2.png) [@alphasig329](https://discourse.julialang.org/u/alphasig329)
#### Post date: [March 26, 2019, 4:02pm UTC](https://discourse.julialang.org/t/jdbc-connectivity-issues/22358/1 "2019-03-26T16:02:39Z")

</div>

using JDBC

JDBC.usedriver(“ojdbc8.jar”)  
JDBC.init()

conn = DriverManager.getConnection(“jdbc:oracle:thin:@HOST\_NAME:PORT:SERVICE\_NAME/user=USERNAME,password=PASSWORD”)

JavaCall.JavaCallError(“Error calling Java: java.sql.SQLException: Listener refused the connection with the following errors:\nORA-12505, TNS: listener does not currently know of SID given in connect descriptor\n”).

I cannot find much documentation about fixing this issue within the package. Although I know it is because I am using a service name as opposed to a SID.

Any assistance would be tremendous.

Thanks,

James

---

<div class="post-metadata">

### Author: ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)
#### Post date: [March 27, 2019, 8:26pm UTC](https://discourse.julialang.org/t/jdbc-connectivity-issues/22358/2 "2019-03-27T20:26:37Z")

</div>

Does the equivalent Java code (ie, with the same connection string) work?

---

<div class="post-metadata">

### Author: ![alphasig329](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alphasig329/32/9794_2.png) [@alphasig329](https://discourse.julialang.org/u/alphasig329)
#### Post date: [March 28, 2019, 1:30pm UTC](https://discourse.julialang.org/t/jdbc-connectivity-issues/22358/3 "2019-03-28T13:30:22Z")

</div>

I ended up playing with the connection string:

JDBC.DriverManager.getConnection(“jdbc:oracle:thin:@HOST\_NAME:PORT/SERVICE\_NAME”, Dict(“user” =\> “USERNAME”, “password” =\> “PASSWORD”))

This ended up connecting to my Oracle Database.

Thanks for reaching out.
