go-ora icon indicating copy to clipboard operation
go-ora copied to clipboard

Add basic support of TNS Names files

Open VoIdemar opened this issue 1 year ago • 0 comments

Hi.

This PR adds basic support of TNS Names files to go-ora.

Support includes:

  1. reading and parsing TNS Names files either specified explicitly via connection URL options (TNS NAMES property) 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.
  2. 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.

VoIdemar avatar Nov 15 '24 11:11 VoIdemar