Skip to content

Add basic support of TNS Names files #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VoIdemar
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant