# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d3b1cd3efbc7 registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g "/bin/sh -c '/home..." 32 seconds ago Up 6 seconds 0.0.0.0:1521->1521/tcp oracle
默认账号和密码:
1 2
#username: system #password: helowin
进入容器:
1
docker exec -it oracle bash
连接数据库。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
source /home/oracle/.bash_profile
sqlplus /nolog SQL> conn / as sysdba Connected.
或 $ sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 26 09:17:43 2020
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter user-name: system # 账号 Enter password: # 密码为helowin
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
SQL> alter user system identified by system; ## 账号和密码为system
User altered.
SQL> alter user sys identified by sys; ## 账号和密码为sys
User altered.
SQL> SQL> alter profile default limit password_life_time unlimited;
Profile altered.
SQL> exit
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 30-AUG-2020 00:54:57
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 27-AUG-2020 23:26:21 Uptime 2 days 1 hr. 28 min. 36 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/diag/tnslsnr/d3b1cd3efbc7/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=d3b1cd3efbc7)(PORT=1521))) Services Summary... Service "helowin" has 1 instance(s). Instance "helowin", status READY, has 1 handler(s) for this service... Service "helowinXDB" has 1 instance(s). Instance "helowin", status READY, has 1 handler(s) for this service... The command completed successfully
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-OCT-2020 11:05:00
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 26-OCT-2020 10:11:00 Uptime 0 days 0 hr. 53 min. 59 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/diag/tnslsnr/5041887d0189/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=5041887d0189)(PORT=1521))) Services Summary... Service "helowin" has 1 instance(s). Instance "helowin", status BLOCKED, has 1 handler(s) for this service... The command completed successfully