Oracle with node-oracle: Error while trying to retrieve text for error ORA-01804

后端 未结 2 1009
情书的邮戳
情书的邮戳 2020-12-22 08:21

I\'m trying to use node-oracle to connect to a Oracle 11g database in UNIX. I can connect fine to the database using TOAD, but now I want to do application queries and this

相关标签:
2条回答
  • 2020-12-22 08:59

    In my case I solved it like this for python

    I solved this by simply zipping the files properly with the symbolic links

    First I created three symbolic links :

    ln -s ./lib/libaio.so.1.0.1 ./lib/libaio.so.1

    ln -s ./lib/libaio.so.1.0.1 ./lib/libaio.so

    ln -s ./lib/libaio.so.1.0.1 ./libaio.so.1.0.1

    ln -s ./lib/libclntsh.so.12.1 ./lib/libclntsh.so

    then I was zipping it incorrectly I did it like this:

    zip --symlinks -r9 ~/lamda.zip *

    It worked! properly then.Hope it helps somebody.

    0 讨论(0)
  • 2020-12-22 09:10

    Thanks to @evenro, I went back to look at Error while trying to retrieve text for error ORA-01804 and tried setting the ORACLE_HOME environment variable.

    It worked, but then I started checking which variables I really needed, so in the end I only used:

    • ORACLE_HOME: pointing at the oracle client basedir
    • LD_LIBRARY_PATH: point at the lib folder inside the client

    This is how it worked in the end:

    ORACLE_HOME=/somefolder/oracle/client/v11.2.0.2-64bit/client_1/ LD_LIBRARY_PATH=/somefolder/oracle/client/v11.2.0.2-64bit/client_1/lib/ node app.js
    

    Thank you again for all the help in the comments, much appreciated.

    0 讨论(0)
提交回复
热议问题