Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
4 posts • Page 1 of 1
4 posts
• Page 1 of 1
yosu
Posts:22
Joined: Wed Mar 14, 2012 4:14 pm
[SOLVED][unixODBC] Can\'t open lib
Postby yosu »
I am trying to connect to an oracle database via odbc. The command "isql test-odbc" connects to database from command line with the same user running WinCCOA.
dbOpenConnection, DSN=test-odbc;DB:[unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1' : file not found;DRV:QODBC3: Unable to connect
Am I missing anything? What is it wrong? If isql command is working from command line, why not dbOpenConnection()?
Check your LD_LIBRARY_PATH environment variable and be sure it contains the path to your Oracle libraries.
Thanks for point to this.
I have already set up all oracle environment variables in /etc/profile.d/oracleenv.sh but this is only loaded by interactive shells. So I move oracle environment variables to /etc/environment and it works!
By the way, I need to setup all this environment variables:
LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib
ORACLE_HOME=/usr/lib/oracle/12.2/client64
TNS_ADMIN=/usr/lib/oracle/12.2/client64/network/admin
ORACLE_HOME=/usr/lib/oracle/12.2/client64
ORACLE_SID=db_test
#TWO_TASK=//database:port/service_name
TWO_TASK=//dbmachine:1521/XE
As I am running the project as a service I need to add to the systemd service a new folder with file /etc/systemd/system/winccoa@.service.d/oracle_env.conf in order to add my environment variables. File content is as follows: