This content has been marked as final. Show 4 replies
Welcome to the forum!
Since 10g, the JDBC Thin URLs have been documented to take the form jdbc:oracle:thin:scott/tiger@//myhost:1521/myservicename. However the old style URLs which uses : instead of / (for example jdbc:oracle:thin:scott/tiger@myhost:1521:myservicename) continues to work even in Oracle 11g.
What does 'continues to work even in Oracle 11g' mean? The URL syntax is specific to the JDBC driver jar version being used, not the version of the database.
Do we know if the support for the old style URLs will be taken off anytime so. There is no document suggesting this, but more & more examples and documentation seem to point towards the / style strings.
One exception case is when the target database is running under Real Application Cluster environment, where-in the old style URLs doesn't work.
No one but Oracle knows.
Oracle 9i was the last version to document the old-style syntax using a colon to separate the database name.
You should use the documented syntax for the version of the JDBC driver that is being used. As you noted since 10g that has been to use the forward slash.
It is also recommended to use DataSource. That class has 'setters' to set the properties (e.g. 'setDatabaseName') and the syntax issue doesn't even arise.
Sounds like you may already have read the 'Database URLs and Database Specifiers section of the JDBC Dev Guide but for others who haven't:
Thanks. Yes, I meant that I am using w/ the Oracle drivers only.
Thanks for the response, I didn't see very many responses. I guess we will have to switch to the new URLs. Strangely though the the 11.2's JDBC driver's README.txt (ORACLE_HOME\jdbc\README.txt) still refers to the old URL and doesn't talk about the new style at all. Very confusing documenation.
A readme is not proper documentation; generally nobody is responsible for keeping them up to date, so they contain stale information. Stick to the official documentation.
You have two basic choices.
1) it ain't broke yet, don't fix it
2) it ain't broke yet, but fix it anyway to conform to online specs
Me I'd take the plunge and go ahead and fix it in a moment where you have the breathing space to do so. That's a whole lot better than having to do it when you no longer have the choice and you have to get a critical high priority life or death release out the door at the same time.