unixODBC: How to Generate ODBC Driver Shared Library libsqora on Linux/Unix
unixODBC: How to Generate ODBC Driver Shared Library libsqora on Linux/Unix [ID 779495.1]
Applies to:
Oracle ODBC Driver - Version: 10.1.0.2
HP-UX Itanium
IBM AIX Based Systems (64-bit)
Linux Itanium
Linux x86-64
Sun Solaris SPARC (64-bit)
Goal
This note describes how to generate / recreate the ODBC Driver shared library
to be used in combination with unixODBC
Solution
- Ensure that the ODBC Driver is installed properly using the Oracle Universal Installer
This can be done by checking if following files exist:
$ORACLE_HOME/odbc/lib/env_odbc.mk
$ORACLE_HOME/odbc/lib/ins_odbc.mk - Go to the ODBC library directory and perform
cd $ORACLE_HOME/odbc/lib
cp $ORACLE_HOME/lib/sqoci.a .
cp $ORACLE_HOME/lib/sqora.a .
cp $ORACLE_HOME/lib/utility.a .
rm libsqora.so* - When using Non-GNU "make" - for example on Solaris - it is required to put comments for first two makefile commands - changing
$(INSTALL_SHORTCUT_TARGETS):
$(MAKE) -f $(ODBCLIB)ins_odbc.mk relink EXENAME=$@
$(INSTALL_SHORTCUT_TARGETS):
$(MAKE) -f $(ODBCLIB)ins_odbc.mk relink EXENAME=$@
to
#$(INSTALL_SHORTCUT_TARGETS):
# $(MAKE) -f $(ODBCLIB)ins_odbc.mk relink EXENAME=$@
#$(INSTALL_SHORTCUT_TARGETS):
# $(MAKE) -f $(ODBCLIB)ins_odbc.mk relink EXENAME=$@
otherwise following errors are throw because makefile syntax is not understand by Non-GNU make:
make: Warning: Too many rules defined for target /raid/oracle/ora111/app/oracle/
product/111/odbc/lib/libsqora.so.11.1
/usr/ccs/bin/make -f /raid/oracle/ora111/app/oracle/product/111/odbc/lib/ins_odb
c.mk relink EXENAME=/raid/oracle/ora111/app/oracle/product/111/odbc/lib/libsqora
.so.11.1
make: Fatal error: Don't know how to make target `relink'
Current working directory /raid/oracle/ora111/app/oracle/product/111/odbc/lib
*** Error code 1
make: Fatal error: Command failed for target `/raid/oracle/ora111/app/oracle/pro
duct/111/odbc/lib/libsqora.so.11.1' - Perform
make -f ins_odbc.mk isqora
cp libsqora.so* $ORACLE_HOME/lib
Output
db111x@amachine:~/app/oracle/product/111/odbc/lib $ cp $ORACLE_HOME/lib/sqoci.a .
db111x@amachine:~/app/oracle/product/111/odbc/lib $ cp $ORACLE_HOME/lib/sqora.a .
db111x@amachine:~/app/oracle/product/111/odbc/lib $ cp $ORACLE_HOME/lib/utility.a .
db111x@amachine:~/app/oracle/product/111/odbc/lib $ rm libsqora.so*
db111x@amachine:~/app/oracle/product/111/odbc/lib $ make -f ins_odbc.mk isqora
ins_odbc.mk:27: warning: overriding commands for target `/raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/lib/libsqora.so.11.1'
ins_odbc.mk:5: warning: ignoring old commands for target `/raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/lib/libsqora.so.11.1'
- Linking sqora
rm -f /raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/lib/libsqora.so.11.1
gcc -o /raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/lib/libsqora.so.11.1 -L/raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/lib/ -L/raid/home/vmware/64/oracle/db111x/app/oracle/product/111/lib/ -L/raid/home/vmware/64/oracle/db111x/app/oracle/product/111/lib/stubs/ `cat /raid/home/vmware/64/oracle/db111x/app/oracle/product/111/lib/sysliblist` -ldl -lm -shared -Wl,-soname,libsqora.so.11.1 -Wl,-whole-archive /raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/lib/sqoci.a /raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/lib/utility.a -Wl,-no-whole-archive -L/raid/home/vmware/64/oracle/db111x/app/oracle/product/111/lib -Bdynamic -lclntsh /raid/home/vmware/64/oracle/db111x/app/oracle/product/111/lib/libcore11.a /raid/home/vmware/64/oracle/db111x/app/oracle/product/111/lib/libunls11.a -L/raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/public/osds/unixODBC/lib -lodbcinst -Wl,-whole-archive /raid/home/vmware/64/oracle/db111x/app/oracle/product/111/odbc/lib/sqora.a -Wl,-no-whole-archive -L/raid/home/vmware/64/oracle/db111x/app/oracle/product/111/lib -lirc -lipgo -ldl
db111x@amachine:~/app/oracle/product/111/odbc/lib $ cp libsqora.so* $ORACLE_HOME/lib - If during linking the link editor "ld" outputs the following
ld: fatal: library -lodbcinst: not found
then the library path does not contain a hint to libodbcinst which is part of the unixODBC package.
In that case it is required to include the storage location of libodbcinst into library path by adding it to
- Linux / Solaris: LD_LIBRARY_PATH
- HP-UX : SHLIB_PATH
- AIX: LIBPATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
Detailed steps howto install unixODBC can be found here:
Note:363686.1 How to Setup and Run Oracle ODBC 10g Driver on Solaris
Note:404041.1 How to Setup and Verify Setup of Oracle ODBC Driver on Linux
If unixODBC has been installed properly, repeat step 4.
References
NOTE:396635.1 - On What Unix/Linux OS are Oracle ODBC Drivers Available ?
NOTE:363899.1 - Using unixODBC with ODBC 3.X API and Oracle ODBC Driver for Solaris or Linux
NOTE:363686.1 - How to Setup and Run Oracle10g ODBC Driver on Solaris
NOTE:404041.1 - How to Setup and Verify Setup of Oracle ODBC Driver on Linux
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-667077/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Microsoft? ODBC Driver 11 for SQL Server? - RedHat LinuxROSSQLServerRedhatLinux
- How to compile libusb as shared/static libraryCompile
- How to generate HMAC-SHA1 in C#?MacC#
- Failed to initialize NVML: Driver/library version mismatchAI
- How To Generate A New Master Encryption Key for the TDE_445147.1AST
- Oracle 12.2 How to Generate AWRs in Active Data Guard Standby DatabasesOracleDatabase
- How To Change UNIX Process Resource LimitsMIT
- unixODBC without the GUIGUI
- 通過ODBC連線windows下SQLServer到UNIX oracleWindowsSQLServerOracle
- How to Recreate the OraInventory on UNIX Systems [ID 472854.1]AI
- Oracle 10g 10.2.0.4 Patchset Server Install - Does Not Install ODBC DriverOracle 10gServer
- 等待模擬-library cache shared pool 硬解析
- How to Move/Recreate GI Management Repository to Different Shared Storage
- Shared pool的library cache lock/pin及硬解析
- How To Use Google Logging Library (glog)Go
- 深入理解shared pool共享池之library cache的library cache lock系列四
- 深入理解shared pool共享池之library cache的library cache pin系列三
- :[IBM][ODBC Oracle Wire Protocol driver][Oracle]ORA-00001: unique constraint (SCIBMOracleProtocolAI
- Linux Use ODBC Connect OracleLinuxOracle
- Linux下ODBC安裝配置Linux
- shared pool之三:library cache結構/library cache object的結構-dump LibraryHandleObject
- 優化Shared Pool Latch與Library Cache Latch競爭優化
- shared pool library cache latch 競爭優化辦法優化
- How to Find which Session is Holding a Particular Library Cache LockSession
- linux下配置ODBC連線MySqlLinuxMySql
- How To Pin Objects in Your Shared Pool [ID 1012047.6]Object
- Flush an Object Out The Library Cache [SGA] Using The DBMS_SHARED_POOLObject
- Shared Pool優化和Library Cache Latch衝突優化優化
- 深入理解shared pool共享池之library cache系列一
- 深入理解shared pool共享池之library cache系列二
- how to generate an analog output from a in-built pwm of Atmega 32AVR microcontrloller?UIVR
- Linux使用perl透過unixODBC連線SQLServer2000(轉)LinuxSQLServer
- Document TitleTECH: Unix Semaphores and Shared Memory Explained (Doc ID 15566.1)AI
- Linux平臺Oracle ODBC安裝使用LinuxOracle
- The Linux USB Video Class (UVC) driverLinuxIDE
- Structure of Linux Kernel Device Driver(Part II)StructLinuxdev
- 如何將UTC時間轉換為Unix時間戳(How to convert UTC time to unix timestamp)時間戳
- CentOs下php連mssql並配置unixODBCCentOSPHPSQL