Error Messages:
create server oradb foreign data wrapper oracle_fdw options (dbserver '//10.20.30.199:1521/test'); create user mapping for USER server oradb options (user 'scott', password 'scott'); GRANT USAGE ON FOREIGN DATA WRAPPER oracle_fdw TO CURRENT_USER; GRANT USAGE ON FOREIGN SERVER oradb TO CURRENT_USER; create foreign table haha ( id int) SERVER oradb OPTIONS (schema 'scott', table 'haha [lightdb@hs-10-20-30-199 ~]$ ltsql -p 5435 -U scott -d scott ltsql (13.3-22.2) Type "help" for help. scott@scott=# select * from haha; ERROR: error connecting to Oracle: OCIEnvCreate failed to create environment handle DETAIL: scott@scott=# scott@scott=# scott@scott=# scott@scott=# scott@scott=# scott@scott=# scott@scott=# select * from haha; ERROR: error connecting to Oracle: OCIEnvCreate failed to create environment handle DETAIL:
Solution:
Install the oracle light client. The oracle client can be downloaded from https://www.oracle.com/database/technologies/instant-client/downloads.html .
export ORACLE_HOME=/home/lightdb/instantclient_21_6
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
Restart lightdb, the problem is solved.
Read More:
- PLSQL even oracle11g problem on 64-bit machine: SQL*Net not properly installed and ORA-12154:TNS: cannot handle service name
- [Solved] ora 01033 linux,ORA-01033: ORACLE initialization or shutdown in progres
- Oracle 12.2.0.1 opatch lsinventory Error: LsInventorySession failed: RawInventory gets null OracleHomeInfo
- [Solved] Tensorflow Error: failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
- ORA-12505 error when java connects to oracle database
- Oracle monitoring error tns-01189 [How to Solve]
- [Solved] Navicat Connect Error: Oracle library is not loaded.
- Oracle Database Cannot Open mount Mode Error: ORA-01102
- Oracle Start as DBA Error [How to Solve]
- [Solved] Oracle Delete the Archive Error: RMAN-08137
- Oracle prompt text does not match format string
- Oracle18c Error: ORA-12012: error on auto execute of job
- Oracle VM VirtualBox open replication virtual machine Error
- [Solved] docker failed to solve: failed to solve with frontend dockerfile.v0: failed to create LLB definition
- Error using tensorflow GPU: could not create cudnn handle: cudnn_STATUS_NOT_INITIALIZED
- [Solved] Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050
- [Solved] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- [Solved] Oracle 18C RAC Install Error: Error in invoking target ‘irman ioracle idrdactl idrdalsnr idrdaproc‘ of makefile
- UnknownHostException error when connecting to Mongo cluster Java
- Tensorflow Run Error or the interface is stuck or report error: Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR