Oracle: Automatically enable support TNSNames aliases if TNS_ADMIN is set #1806
Comments
Hello, According to Oracle documentation: When using TNSNames with the JDBC Thin driver, you must set the oracle.net.tns_admin property to the directory that contains your tnsnames.ora file. Try with:
|
Yeah that's the change I have made although the flyway command line executable automatically picks up the path based on the TNS_ADMIN environmental variable and automatically passes the JVM property in. |
Thank you very much for the suggestion. I really liked the idea of making it automatic and ending up adding this TNS_ADMIN autodetection to the core to make it available to all clients. |
Excellent - it's definitely better suited at the core library level. Not the biggest of changes but a very useful one to those using Oracle databases. |
…ses if TNS_ADMIN is set
…flyway#1806) does not work correctly
What version of Flyway are you using?
4.2.0
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
Command Line
What database are you using (type & version)?
Oracle XE 11.2
Oracle Enterprise 12c
What operating system are you using?
Windows 10
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
Tried connecting to database using TNSNames within the database connection string url as follows:
jdbc:oracle:thin:@LOCAL_ORCL
Which is a valid connection string as per the Oracle documentation:
http://docs.oracle.com/cd/B19306_01/java.102/b14355/urls.htm#BEIJFHHB
The command I ran was:
With the configuration file as follows:
What did you expect to see?
Successful connection to the Database similar to the following:
What did you see instead?
I have a local fix and have successfully been using it against Oracle Enterprise 12c Database and will submit a pull request in the coming days once I have made the documentation changes.
The text was updated successfully, but these errors were encountered: