Introduction
Mostly we make a connection to Oracle using JDBC through SID. Recently I have to make a connection to Oracle using Service Name. I am writing this post to share my experience.
SID Connection String
Service Name connection String
Replace Service Name and host address per your configuration
These strings work both for plain JDBC and hibernate.
For hibernate configuration, put the above string inside
<property name="connection.url">Above connection String</property>
tag of hibernate.cfg.xml.
Conclusion
Happy learning
Great read, really informative. Find out more here: SEO Services in Chennai
ReplyDelete