Instant Client for linux
2013-05-06 12:22
183 查看
sometime for some reason,ex. you can't install on the host,not get the install package,or others.but you want connnect the oracle database via sqlplus only,in times you can use oracle Instant Client,the package very small than database or client package.
i will show how-to use the package conn the database.
0. download the package and extract file to ~/oraclient.
[gtlions@o564gtser1 ~]$ ll oraclient/
total 185224
-rwxrwxr-x 1 gtlions gtlions 25308 Sep 17 2011 adrci
-rw-rw-r-- 1 gtlions gtlions 437 Sep 17 2011 BASIC_README
-rwxrwxr-x 1 gtlions gtlions 46228 Sep 17 2011 genezi
-r--r--r-- 1 gtlions gtlions 368 Sep 17 2011 glogin.sql
-rwxrwxr-x 1 gtlions gtlions 52761218 Sep 17 2011 libclntsh.so.11.1
-r-xr-xr-x 1 gtlions gtlions 7955322 Sep 17 2011 libnnz11.so
-rwxrwxr-x 1 gtlions gtlions 1971762 Sep 17 2011 libocci.so.11.1
-rwxrwxr-x 1 gtlions gtlions 118408281 Sep 17 2011 libociei.so
-r-xr-xr-x 1 gtlions gtlions 164836 Sep 17 2011 libocijdbc11.so
-r-xr-xr-x 1 gtlions gtlions 1503303 Sep 17 2011 libsqlplusic.so
-r-xr-xr-x 1 gtlions gtlions 1477446 Sep 17 2011 libsqlplus.so
-r--r--r-- 1 gtlions gtlions 2095661 Sep 17 2011 ojdbc5.jar
-r--r--r-- 1 gtlions gtlions 2714016 Sep 17 2011 ojdbc6.jar
-r-xr-xr-x 1 gtlions gtlions 9352 Sep 17 2011 sqlplus
-rw-rw-r-- 1 gtlions gtlions 441 Sep 17 2011 SQLPLUS_README
-rw-rw-r-- 1 gtlions gtlions 177 May 6 12:01 tnsnames.ora
-rwxrwxr-x 1 gtlions gtlions 191237 Sep 17 2011 uidrvci
-rw-rw-r-- 1 gtlions gtlions 66779 Sep 17 2011 xstreams.jar
1. edit env file .bash_profile like follow lines.
[gtlions@o564gtser1 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export LD_LIBRARY_PATH=/home/gtlions/oraclient
export PATH=$PATH:~/oraclient
export TNS_ADMIN=~/oraclient
[gtlions@o564gtser1 ~]$ source .bash_profile
2. manual edit ~/oraclient/tnsnames.ora connect strings.
[gtlions@o564gtser1 ~]$ cat oraclient/tnsnames.ora
ora11g =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.46.1.3)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g)
)
)
3. connect it.
[gtlions@o564gtser1 ~]$ sqlplus gtlions/000000@ora11g
SQL*Plus: Release 11.2.0.3.0 Production on Mon May 6 12:17:46 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
-EOF-
i will show how-to use the package conn the database.
0. download the package and extract file to ~/oraclient.
[gtlions@o564gtser1 ~]$ ll oraclient/
total 185224
-rwxrwxr-x 1 gtlions gtlions 25308 Sep 17 2011 adrci
-rw-rw-r-- 1 gtlions gtlions 437 Sep 17 2011 BASIC_README
-rwxrwxr-x 1 gtlions gtlions 46228 Sep 17 2011 genezi
-r--r--r-- 1 gtlions gtlions 368 Sep 17 2011 glogin.sql
-rwxrwxr-x 1 gtlions gtlions 52761218 Sep 17 2011 libclntsh.so.11.1
-r-xr-xr-x 1 gtlions gtlions 7955322 Sep 17 2011 libnnz11.so
-rwxrwxr-x 1 gtlions gtlions 1971762 Sep 17 2011 libocci.so.11.1
-rwxrwxr-x 1 gtlions gtlions 118408281 Sep 17 2011 libociei.so
-r-xr-xr-x 1 gtlions gtlions 164836 Sep 17 2011 libocijdbc11.so
-r-xr-xr-x 1 gtlions gtlions 1503303 Sep 17 2011 libsqlplusic.so
-r-xr-xr-x 1 gtlions gtlions 1477446 Sep 17 2011 libsqlplus.so
-r--r--r-- 1 gtlions gtlions 2095661 Sep 17 2011 ojdbc5.jar
-r--r--r-- 1 gtlions gtlions 2714016 Sep 17 2011 ojdbc6.jar
-r-xr-xr-x 1 gtlions gtlions 9352 Sep 17 2011 sqlplus
-rw-rw-r-- 1 gtlions gtlions 441 Sep 17 2011 SQLPLUS_README
-rw-rw-r-- 1 gtlions gtlions 177 May 6 12:01 tnsnames.ora
-rwxrwxr-x 1 gtlions gtlions 191237 Sep 17 2011 uidrvci
-rw-rw-r-- 1 gtlions gtlions 66779 Sep 17 2011 xstreams.jar
1. edit env file .bash_profile like follow lines.
[gtlions@o564gtser1 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export LD_LIBRARY_PATH=/home/gtlions/oraclient
export PATH=$PATH:~/oraclient
export TNS_ADMIN=~/oraclient
[gtlions@o564gtser1 ~]$ source .bash_profile
2. manual edit ~/oraclient/tnsnames.ora connect strings.
[gtlions@o564gtser1 ~]$ cat oraclient/tnsnames.ora
ora11g =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.46.1.3)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g)
)
)
3. connect it.
[gtlions@o564gtser1 ~]$ sqlplus gtlions/000000@ora11g
SQL*Plus: Release 11.2.0.3.0 Production on Mon May 6 12:17:46 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
-EOF-
相关文章推荐
- Installing PHP and the Oracle Instant Client for Linux and Windows For PHP 5.5, OCI8 2.0 and Oracle
- Instant Client Downloads for Linux x86
- Oracle Instant Client for linux安装
- RabbitMQ C++客户端 RabbitMQ Client for Windows/Linux 超简单接收发送接口-最近更新2018-02-28
- InstantClient linux64位安装指南
- 为 Linux 和 Windows 安装 PHP 和 Oracle 10g Instant Client
- 只安装和配置instantclient,用plsql developer,navicat for oracle,sqlplus连接oracle数据库 .
- C Socket Programming for Linux with a Server and Client Example Code
- RainLoop Webmail – A Modern Fast Web Based Email Client for Linux
- Instant Client package is required for Baic and TNS connection
- Linux上安装配置InstantClient及64位系统Pl/SQL配置
- linux下OCI基础:配置Instant Client连oracle数据库
- linux单独安装oracle客户端(instantclient)
- Linux下利用instantclient实现PHP…
- 第一次navalcat连接oracle数据库Cannot load OCI DLL 87: Instant Client package is required for Basic and TNS c
- 菜鸟:只安装和配置instantclient,用plsql developer,navicat for oracle,sqlplus连接oracle数据库
- Linux下 和 Windows 下 Oracle Instant Client 的安装.
- UDP Server Client Implementation in C for Unix/Linux