go-ora
go-ora copied to clipboard
Add basic support of TNS Names files
Hi.
This PR adds basic support of TNS Names files to go-ora.
Support includes:
- reading and parsing TNS Names files either specified explicitly via connection URL options (
TNS NAMESproperty) or found at${TNS_ADMIN}/tnsnames.ora. Existing ANTLR grammars for such files are not full, therefore an own implementation of the parser was written. - using data from TNS Names to resolve net service names from connection URL-s to actual database server addresses.
Support is pretty basic at the moment - various features like fail-over, load balancing and others, which can be specified in TNS Names files via corresponding properties, are not supported at the moment. Implementation is trying to be as fail-fast as possible - if an unsupported property is present in the resolved TNS Names file, go-ora will fail.
README.md has also been modified accordingly.
Thanks.