-
Notifications
You must be signed in to change notification settings - Fork 1
ORACLE XE
GradedJestRisk edited this page Oct 20, 2024
·
1 revision
Overview
docker pull rafaelri/docker-oracle-xe-11g
Add this to listener.ora SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
Run exposing ports 8080 and 1521 and with /var/lib/oracle volume for storing data:
docker run -d -v /home/myuser/oracle:/var/lib/oracle -p 8081:8080 -p 49161:1521 rafaelri/oracle-xe-11g
- or
docker run -d -v /home/myuser/oracle:/var/lib/oracle -p 8081:8080 -p 49161:1521 14fd3d0c8cfb
Check with docker logs <CONTAINER_ID>
, youl get
Starting Oracle Starting Oracle Net Listener. Starting Oracle Database 11g Express Edition instance. Trace level is currently 0 Started with pid=25 Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=9dcc12f6d975)(PORT=1521)))
Overview:
- hostname: localhost
- port: 49161
- sid: xe
- username: system
- password: $ORACLE_PASSWORD
- ORACLE_PASSWORD
- /var/lib/oracle
overview:
- log in the container
docker exec -it <CONTAINER_ID> bash
overview:
- set path
export PATH=$PATH:/u01/app/oracle/product/11.2.0/xe/bin
- check listener
lsnrctl status LISTENER
, gotService "XE" has 1 instance(s).
- check listener in on
tnsping xe
, gotAttempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = de1c58518b05)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
- connect to db
sqlplus system/manager@xe
overview:
- connect as oracle
SHUTDOWN IMMEDIATE
ORA-01507: database not mounted ORACLE instance shut down.
overview:
- connect as oracle
su oracle
- set path
export PATH=$PATH:/u01/app/oracle/product/11.2.0/xe/bin
- connect trough sqlplus
sqlplus /AS SYSDBA
- connect as oracle
STARTUP
ORA-01507: database not mounted ORACLE instance shut down.