Linux下远程连接Oracle数据库

1.安装instantclient的相关包:

instantclient-basic-linux-x86-64-11.2.0.2.0.zip 基础包

instantclient-sdk-linux-x86-64-11.2.0.2.0.zip 使用c或perl连接db

  instantclient-sqlplus-linux-x86-64-11.2.0.2.0.zip sqlplus

2.设置环境变量

export PATH=/home/loganalysis/perlM/instantclient/instantclient_11_2:$PATH

export Oracle_HOME=/home/loganalysis/perlM/instantclient/instantclient_11_2

export  LD_LIBRARY_PATH=/home/loganalysis/perlM/instantclient/instantclient_11_2

export  SQLPATH=/home/loganalysis/perlM/instantclient/instantclient_11_2:${SQLPATH}

export  TNS_ADMIN=/home/loganalysis/perlM/instantclient/instantclient_11_2:${TNS_ADMIN}

3.复制tnsnames.ora至/home/loganalysis/perlM/instantclient/instantclient_11_2

相关推荐