Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Oracle XE 21.3.0 INIT_SGA_SIZE and INIT_PGA_SIZE ignored #2216

Closed
alexbarta opened this issue Dec 27, 2021 · 2 comments
Closed

Docker Oracle XE 21.3.0 INIT_SGA_SIZE and INIT_PGA_SIZE ignored #2216

alexbarta opened this issue Dec 27, 2021 · 2 comments
Assignees
Labels

Comments

@alexbarta
Copy link

Hi,

I'm running the container Oracle 21.3.0 XE version, but it fails during startup with message:

docker run -d --name testroracle -p 1521:1521 -p 5500:5500 --shm-size 2G -e ORACLE_SID=XE -e ORACLE_PWD=**** -e INIT_SGA_SIZE=1600 -e INIT_PGA_SIZE=256 -e ORACLE_EDITION=21.3.0 oracle/database:21.3.0-xe
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
Enter SYS user password:                                                                                             ************
Enter SYSTEM user password:
*********
Enter PDBADMIN User Password:
********
Prepare for db operation
7% complete
Copying database files
8% complete
[WARNING] ORA-00821: Specified value of sga_target 1536M is too small, needs to be at least 1600M
ORA-01078: failure in processing system parameters

9% complete
[FATAL] ORA-01034: ORACLE not available

29% complete
100% complete
[FATAL] ORA-01034: ORACLE not available

7% complete
0% complete
Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.

Database configuration failed. Check logs under '/opt/oracle/cfgtoollogs/dbca'.

the problem is related to INIT_SGA_SIZE and INIT_PGA_SIZE vars not honored by the setup procedure.
I had to sed the files with the wanted parameters so docker run command became:

docker run -d --name testroracle -p 1521:1521 -p 5500:5500 --shm-size 2G -e ORACLE_SID=XE -e ORACLE_PWD=password -e INIT_SGA_SIZE=1600 -e INIT_PGA_SIZE=256 -e ORACLE_EDITION=21.3.0 oracle/database:21.3.0-xe sh -c 'sed -i "s/1536/1600/" /opt/oracle/product/21c/dbhomeXE/assistants/dbca/templates/XE_Database.dbc && sed -i "s/512/256/" /opt/oracle/product/21c/dbhomeXE/assistants/dbca/templates/XE_Database.dbc && /opt/oracle/runOracle.sh'
@abhisbyk
Copy link
Contributor

@alexbarta For Oracle 21c XE, we do not support setting up INIT_SGA_SIZE and INIT_PGA_SIZE while running the image using docker run command.

@abhisbyk
Copy link
Contributor

Closing this issue for now. Please feel free to reopen if you have any other queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants