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
Add support for IFILE in tnsnames.ora #311
Comments
Can you provide an example? Or a reference to the Oracle documentation that shows how this is used? A quick search doesn't bring up anything relevant. Thanks! |
Thanks. |
thanks to you! Our DBA team is looking to extend the usage of IFILE to our deployed tnsnames.ora files. Do think that is something that can be added to the roadmap soon? |
Could we get an ETA for this item, please? |
I am looking into it and I hope to include it in version 2.2. I don't know the ETA for that exactly yet, but the patch will be available before the release if you are able to build binaries yourself? |
Sounds good, thank you! |
Is this still planned for oracledb 2.2.0? |
Yes, it is. I hope to have a patch available fairly soon. Stay tuned! |
A patch is now available. If you are able to build from source you can verify that it works for you, too. |
hi Anthony, I've tried the patch but getting below error:
I've checked with our DBA team and it's allowed to have multiple service name entries with the same name. The parser keeps the last entry it finds (though I've not yet found any mention of this in the documentation). |
Yes, there are some differences with how this has been implemented compared to the C and Java implementations, and yes, this is not well-documented, if at all!
In each of the above cases I believe the Python implementation is an improvement and results in less confusion over how network service names are resolved and what value they resolve to! With respect to the particular error you are getting, can your DBA team explain WHY they want to have the same network service name defined differently in the same file? And why that is not a source of confusion? |
I understand this could be seen as an improvement however the problem is that connecting with sqlplus or with python-oracledb have different behaviors whereas we would expect consistency between implementations, no matter how we connect. Checking if I can get more information from our DBA team. Initial feedback is that it's been working like so for years and I don't expect any changes since it works for all other use cases. |
You can have consistency -- once you correct your configuration to remove the ambiguity! :-) Each of the differences noted above are for arguably invalid configurations or due to limitations of the C and Java implementations. If you have any good counter arguments I would love to hear them! |
Do you agree this is a breaking change though? I've tested with a tnsnames.ora file that does not contain the IFILE directive.
|
Technically, I suppose. It can also be considered a bug fix. :-) I'll add a release note for that scenario. Thanks for pointing it out! |
Following up with our DB team. The duplicate entry logic is used as a feature using IFILE where the last entry is the one used to allow for overrides. e.g. tnsnames.ora where both files can define the same entry but the local one can redefine an entry based on network access. Also, others appear to be using this logic as well (though not documented officially).
In summary, the current implementation is going to break our connections including with tnsnames.ora that do not use IFILE. |
Human ingenuity never ceases to amaze me! I will discuss it internally but I understand your point and can see the use of such a "feature". :-) |
depend on these "features" (#311).
I've pushed changes to revert the check as requested. |
Yes. I confirm it works now ! thank you very much. |
This was included in version 2.2.0 which was just released. |
a crash
No, running Thin mode
The text was updated successfully, but these errors were encountered: