接下来进入镜像的 bash 做进一步操作。
[root@Docker ~]# docker exec -it 3ceb1ae8637e /bin/bash
root@3ceb1ae8637e:/#
root@3ceb1ae8637e:/# ss -nlpt
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:42983 *:*
LISTEN 0 128 *:8080 *:*
LISTEN 0 128 *:1521 *:*
接下来登陆数据库
# sqlplus system/oracle@//localhost:1521/xe
SQL*Plus: Release 12.1.0.2.0 Production on Fri May 18 09:27:11 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Fri May 18 2018 09:26:42 +00:00
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL> show parameter service_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string xe
SQL>
pl/sql 连接 Oracle
下载一个plsql development,还有一个Oracle客户端
新建下面3个环境变量
NLS_LANG
AMERICAN_AMERICA.AL32UTF8
ORACLE_HOME
D:\instantclient_11_2
TNS_ADMIN
d:\instantclient_11_2\network\ADMIN
解压oracle客户端以后,新建 network\ADMIN 文件夹
新建文件 tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.153.32)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.site)
)
)
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx