instantclient_10_2 使用
admin
2023-04-14 11:01:52
0

1、 创建oracle用户
useradd oracle
2、在oracle用户下面创建soft文件夹
mkdir -p /home/oracle/soft/
3、上传对应软件并解压
unzip basic-10.2.0.5.0-linux-x64.zip
unzip sqlplus-10.2.0.5.0-linux-x64.zip
4、编辑环境变量
vim .bash_profile

增加以下两行
export LD_LIBRARY_PATH=/home/oracle/soft/instantclient_10_2
export PATH=$PATH:$LD_LIBRARY_PATH
5创建tnsname.ora的文件夹
/home/oracle/soft/instantclient_10_2/network/admin

编辑

[oracle@maxscale62 ~]$ cat /home/oracle/soft/instantclient_10_2/network/admin/tnsnames.ora
ora169 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.169)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME =orcl10g.us.oracle.com)
)
)

[oracle@oracleinstall ~]$ ifconfig |grep inet
inet 192.168.0.169 netmask 255.255.255.0 broadcast 192.168.0.255

[oracle@oracleinstall ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 23-MAY-2019 14:56:33

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER

Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 22-MAY-2019 18:46:58
Uptime 0 days 20 hr. 9 min. 35 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracleinstall)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "TSH1XDB.us.oracle.com" has 1 instance(s).
Instance "TSH1", status READY, has 1 handler(s) for this service...
Service "orcl10g.us.oracle.com" has 1 instance(s).
Instance "TSH1", status READY, has 1 handler(s) for this service...
Service "orcl10g_XPT.us.oracle.com" has 1 instance(s).
Instance "TSH1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oracleinstall ~]$

主要是找到:Service

连接确认
$ sqlplus test/test@ora169

SQL*Plus: Release 10.2.0.5.0 - Production on Thu May 23 14:59:46 2019

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>
连接确认2:
$ sqlplus test/test@//192.168.0.169:1521/orcl10g.us.oracle.com

SQL*Plus: Release 10.2.0.5.0 - Production on Thu May 23 15:00:31 2019

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>

连接确认3
$ sqlplus test/test@//192.168.0.169:1521/TSH1XDB.us.oracle.com

SQL*Plus: Release 10.2.0.5.0 - Production on Thu May 23 15:01:25 2019

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>

连接确认4
$ sqlplus test/test@//192.168.0.169:1521/orcl10g_XPT.us.oracle.com

SQL*Plus: Release 10.2.0.5.0 - Production on Thu May 23 15:02:00 2019

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>

相关内容

热门资讯

【第一消息】“天天微友棋牌真的... 网上科普关于“天天微友棋牌有没有挂”话题很是火热,小编也是针对天天微友棋牌作*弊开挂的方法以及开挂对...
重磅消息“乐享牛牛是不是有挂?... 家人们!今天小编来为大家解答乐享牛牛透视挂怎么安装这个问题咨询软件客服徽4282891的挂在哪里买很...
玩家最新攻略“微信拼三张有没有... 网上科普关于“微信拼三张有没有挂”话题很是火热,小编也是针对微信拼三张作*弊开挂的方法以及开挂对应的...
【第一资讯】“闽悦麻将真的有挂... 有 亲,根据资深记者爆料闽悦麻将是可以开挂的,确实有挂(咨询软件无需打开...
终于懂了“卡农炸/金/花真的有... 您好:卡农炸/金/花这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这...
重磅消息“新皇豪牛牛到底是不是... 重磅消息“新皇豪牛牛到底是不是挂?”(太坑了果然有挂)您好,新皇豪牛牛这个游戏其实有挂的,确实是有挂...
终于了解“笑傲江湖究竟有挂吗?... 您好:笑傲江湖这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...
【第一消息】“普通扑克雷达感应... 家人们!今天小编来为大家解答普通扑克雷达感应分析仪透视挂怎么安装这个问题咨询软件客服徽9784099...
玩家最新攻略“湘乐怎么开挂?”... 有 亲,根据资深记者爆料湘乐是可以开挂的,确实有挂(咨询软件无需打开直接...
重磅消息“普通扑克分析哪家大小... 重磅消息“普通扑克分析哪家大小开挂神器?”(太坑了原来有挂)您好,普通扑克分析哪家大小这个游戏其实有...