Linux下sqlplus远程访问Oracle
来源:互联网 发布:清除文件 linux 编辑:程序博客网 时间:2024/06/05 06:50
转载请注明:http://blog.csdn.net/fuqiangnxn/article/details/53841062
第一步:下载instantclient,下载地址如下
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
instantclient-basic-linux.x64-12.1.0.2.0.zip //必须
instantclient-sqlplus-linux.x64-12.1.0.2.0.zip //必须
instantclient-odbc-linux.x64-12.1.0.2.0.zip//此处不需要,为unixODBC连接时,需要使用的包
将上面2个zip包解压到到任意位置,例如/opt/oracle/instantclient_12_1
.
下面为oracle官方文档
3. Create the appropriate libclntsh.so
and libocci.so
links for the version of Instant Client. For example:
cd /opt/oracle/instantclient_12_1ln -s libclntsh.so.12.1 libclntsh.soln -s libocci.so.12.1 libocci.so
4. Install the libaio
package, for example on Oracle Linux, run this as the root user: //注意我并未安装libaio包
yum install libaio
On some Linux distributions the package is called libaio1
.
第二步:
配置环境变量:
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1:$LD_LIBRARY_PATH
export PATH=/opt/oracle/instantclient_12_1:$PATH
NLS_LANG="AMERICAN_AMERICA.AL32UTF8"
登录:sqlplus username/passwd@IP:port/servicename //特别注意port后为servicename,而不是instance name。
第三步:通过配置 tnsnames.ora访问oracle
配置环境变量
export TNS_ADMIN=/opt/oracle/instantclient_12_1
在TNS_ADMIN下建立tnsnames.ora文件
内容为:
- oracledb = //登陆的SID
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.103.232)(PORT = 1521)) //IP地址和端口号
- (CONNECT_DATA =
- (SERVER = DEDICATED)
- (SERVICE_NAME = orc9i) //要链接数据库servicename
- )
- )
登录sqlplus username/passwd@oracledb
1 0
- Linux下sqlplus远程访问Oracle
- Linux sqlplus远程访问Oracle
- ORACLE linux 下 sqlplus命令
- xshell下远程访问Linux系统,在sqlplus下退格键乱码问题
- Linux下安装Oracle客户端远程访问Oracle数据库
- 设置sqlplus访问远程oracle数据库的最快方法
- 设置sqlplus访问远程oracle数据库的最快方法
- sqlplus连接远程oracle
- sqlplus远程连接Oracle
- sqlplus连接远程Oracle
- unix下远程访问oracle
- Oracle sqlplus访问数据库
- Linux - SecureCRT 中 sqlplus 配置 远程连接Linux下的sqlplus中退格键
- 远程访问linux下mysql
- linux下远程访问Mysql
- linux下远程访问Mysql
- linux下远程访问Mysql
- linux下mysql远程访问
- json.stringify和json.parse,序列化和反序列化
- 289. Game of Life
- PE文件结构详解--PE导出表
- 【Java 简介】
- 每天一个 Linux 命令(6):rmdir 命令
- Linux下sqlplus远程访问Oracle
- When to use RDDs, Datasets, and DataFrames?
- 常用gulp插件介绍(一)
- ubuntun16.04 +cuda8.0+cudnn5+opencv2.3+python+caffe安装过程中出现的一些问题
- CodeForces-747C
- Python学习笔记,5,字符串和编码问题
- 学习python的第四十四天-正则表达式
- socket编程
- .NET 版 和 PYThon 操作LDAP