????oracle??????????????????????tns???????????????rpm???????oracle?????????????????rpm?????????
????1.???????oracle????????????????????????汾??????
oracle-instantclient-basic-10.2.0.4-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm
oracle-instantclient-devel-10.2.0.4-1.i386.rpm
????2.PM???
oracle-instantclient-basic-10.2.0.4-1.i386.rpm???????????jar?????????·?????/usr/lib/oracle/10.2.0.4/client
oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm??????sqlplus??????? ?????·?????/usr/lib/oracle/10.2.0.4/client
oracle-instantclient-devel-10.2.0.4-1.i386.rpm??api?????????????·?????/usr/include/oracle/10.2.0.4/client
?????????????????·??????????????
sudo rpm-avi oracle-instantclient-basic-10.2.0.4-1.i386.rpm
sudo rpm-avi oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm
sudo rpm-avi oracle-instantclient-devel-10.2.0.4-1.i386.rpm
????3.???????????
vi /etc/profile
export ORACLE_HOME=/usr/lib/oracle/10.2.0.4
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
exportLD_LIBRARY_PATH=$ORACLE_HOME/client/lib:$LD_LIBRARY_PATH
exportOCI_HEADERS_HOME=/usr/include/oracle/10.2.0.4/client
export OCI_LIBS_HOME=$ORACLE_HOME/client/lib
??????????????????????????????????÷?????????????????
????-I$( OCI_HEADERS_HOME) –L$( OCI_LIBS_HOME) –l occi
????4.???ü??????????繃??
[huangxw@ubuntu admin]$
cat/usr/lib/oracle/10.2.0.4/network/admin/tnsnames.ora
test_base=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.*)(PORT = ****))
)
(CONNECT_DATA =
(SERVICE_NAME = tt4adol)
)
)
????5.????????
[huangxw@ubuntu bin]$./sqlplus USERNAME/PASSWD@test_base
SQL*Plus: Release 10.2.0.4.0 - Production onMon Jan 13 10:09:31 2014
Copyright (c) 1982?? 2007?? Oracle.  All Rights Reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release11.2.0.2.0 - 64bit Production
With the Partitioning?? OLAP?? Data Mining andReal Application Testing options
SQL> select * from USERNAME.TABLENAME  where accountid = 8401428;
ACCOUNTID   INVTA     SNDA    RAINA   INSB    SPEN    REMN
---------- ---------- ---------- -------------------- ---------- ----------
INVTC     SPDC    REIN
---------- ---------- ----------
8401428          0          0    100000          0          0          0
0          0          0