-
Notifications
You must be signed in to change notification settings - Fork 282
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
db#oci
: Access Database via tnsnames.ora / LDAP Naming Services
#5062
Comments
oci
: Access Database via tnsnames.ora / LDAP Naming Services
`oci` uses Zend's `Oracle` adapter, which does not use this setting at all. fixes #5062
Hi, we recently checked the functionality of this new feature, and found out, that while "host" is now optional for oci database resources (5063), the setting do not work out to create an actual database-connection: Neither tnsnames.ora nor the use of LDAP naming services is working here, as we tested both with the same results ( |
Hi @TQQEU, Where is your
Best regards, |
Hi @lippserd, sorry for the delay. our tnsnames.ora is located in Another file |
Hi @slalomsk8er, I'm still not sure if this was the case before, but I made sure that TNS_ADMIN is now set via the web server configuration and therefore should now be set for PHP, too. The result has not changed so far. I would still like to test where PHP is looking for things. It would be very helpful if you could share your approach from #5062 (comment). |
@TQQEU the output in #5062 (comment) looks like it comes from |
Note that this is CLI and not web context, so actual paths may differ depending on the environment variables. Proof that setting
For web you could set the env variable in
|
Hi @lippserd, Many thanks for your help! Today I managed to get php to use the configuration file, which (contrary to my original expectations) did not work via the web server configuration, but via the php-fpm configuration. I can now confirm: There is currently no program error here, only a configuration problem. We're happy to close this issue. |
We have an Oracle database in addition to our Icinga2/Icingaweb2 installation, from which we import data using the Icinga-Director.
Here is an anonymized example configuration from icingaweb2-resources.ini:
It's possible to access the database via the command line by entering something like "sqlplus USER@DB_ALIAS" if the ALIAS is defined in the tnsnames.ora file (see https://www.orafaq.com/wiki/Tnsnames.ora).
Another option is the use of LDAP naming services (see https://docs.oracle.com/cd/E23824_01/html/821-1455/overview-1.html).
We now need to be able to use the configuration via tnsnames.ora or LDAP naming services - so the connect string will consist only of the service name.
The specification of a port and server name should be optional - if they are not present, resolution should occur through tnsnames.ora (if available) or LDAP naming services.
OCI8, the php lib used (https://www.php.net/manual/en/book.oci8.php) should fundamentally supports this, but currently not the Director.
Our Environment
icinga2 --version
): 2.13.5-1The text was updated successfully, but these errors were encountered: