Java JDBC - How to connect to Oracle using Service Name instead of SID

前端 未结 8 1160
醉话见心
醉话见心 2020-11-22 15:14

I have a Java application that uses JDBC (via JPA) that was connecting to a development database using hostname, port and Oracle SID, like this:

jdbc:oracle:

8条回答
  •  猫巷女王i
    2020-11-22 15:42

    When using dag instead of thin, the syntax below pointing to service name worked for me. The jdbc:thin solutions above did not work.

    jdbc:dag:oracle://HOSTNAME:1521;ServiceName=SERVICE_NAME
    

提交回复
热议问题