It mainly involves two platforms: 1. Configure the environment on the ORACLE server installed [ba @ nod1-balib] $ cat ~. Bash_profile #. bash_profile # Getthealiasesandfunctionsif [-f ~. Bashrc]; then .~. Bashrcfi # UserspecificenvironmentandstartupprogramsPATH $ PAT
It mainly involves two platforms: 1. Configure the environment on the ORACLE server installed [ba @ nod1-ba lib] $ cat ~ /. Bash_profile #. bash_profile # Get the aliases and functions if [-f ~ /. Bashrc]; then .~ /. Bashrc fi # User specific environment and startup programs PATH = $ PAT
Mainly divided into two platforms
1. On an ORACLE Server
Configure the environment
[Ba @ nod1-ba lib] $ cat ~ /. Bash_profile
#. Bash_profile
# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specific environment and startup programs
PATH = $ PATH: $ HOME/bin
Export PATH
Unset USERNAME
Export ORACLE_BASE =/oracle
Export ORACLE_HOME =/oracle/rac
Export CRS_HOME =/oracle/crs
Export ORACLE_SID = esunba1
Export PATH = $ ORACLE_BASE/OPatch: $ ORACLE_HOME/bin: $ CRS_HOME/bin: $ PATH:/sbin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib: $ LD_LIBRARY_PATH
Export LC_ALL = 'zh _ CN'
Export NLS_DATE_FORMAT = 'yyyy-MM-DD HH24: MI: ss'
Export NLS_TIMESTAMP_FORMAT = 'yyyy-MM-DD HH24: MI: SSXFF'
Export NLS_LANG = 'simplified CHINESE_CHINA.ZHS16GBK'
Compile the built-in Columns
OCCI interface Compilation
G ++ occidml. cpp-I $ ORACLE_HOME/rdbms/public-L $ ORACLE_HOME/lib-locci-lclntsh-o occidml.exe
The first parameter is the original file, the second parameter is the location where the header file is located, and the third parameter is the location where the library file is located. The fourth and fifth parameters are the name of the database to be connected, the sixth parameter is the name of the output executable file.
2 Second platform
Client SDK installed
: Http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
Pay attention to the database version number and SDK package
Move *. so to the OCCI_LIB directory.
Copy *. h In instantclient/sdk/include to the OCCI_H directory.
Edit ~ /. Bash_profile
OCCI_H = $ OCCI_H:/home/es348/include/occi/sdk/include
OCCI_LIB = $ OCCI_LIB:/home/es348/include/occi/lib
Export OCCI_H
Export OCCI_LIB
Compile
G ++ occidml. cpp-I $ OCCI_H-L/home/es348/include/occi/lib-locci-lclntsh-o occidml.exe
The Library about G ++ 343 is included in the SDK package. Other notes
Mine is:
G ++-v
Use built-in specs.
Goals: i386-redhat-linux
Configuration :.. /configure -- prefix =/usr -- mandir =/usr/share/man -- infodir =/usr/share/info -- enable-shared -- enable-threads = posix -- enable-checking = release -- with-system-zlib -- enable-_ cxa_atexit -- disable-libunwind-exceptions -- enable-libgcj-multifile -- enable-versions ages = c, c ++, objc, obj-c ++, java, fortran, ada -- enable-java-awt = gtk -- disable-dssi -- enable-plugin -- with-java-home =/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre -- with-cpu = generic -- host = i386-redhat-linux
Thread model: posix
Gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)