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

Allow the initial amount of memory for databases to be configurable #1576

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make memory configurable in 19c
Signed-off-by: Steve Swinsburg <steve.swinsburg@gmail.com>
  • Loading branch information
Steve Swinsburg committed Apr 14, 2020
commit 580fe4c305a6a7f36ea15afa9fc657a8d229e341
3 changes: 3 additions & 0 deletions OracleDatabase/SingleInstance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ To run your Oracle Database Docker image use the **docker run** command as follo
-e ORACLE_SID=<your SID> \
-e ORACLE_PDB=<your PDB name> \
-e ORACLE_PWD=<your database passwords> \
-e ORACLE_MEM=<amount of memory to allocate> \
-e ORACLE_CHARACTERSET=<your character set> \
-v [<host mount point>:]/opt/oracle/oradata \
oracle/database:19.3.0-ee
Expand All @@ -70,6 +71,8 @@ To run your Oracle Database Docker image use the **docker run** command as follo
-e ORACLE_SID: The Oracle Database SID that should be used (default: ORCLCDB)
-e ORACLE_PDB: The Oracle Database PDB name that should be used (default: ORCLPDB1)
-e ORACLE_PWD: The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)
-e ORACLE_MEM: The amount of memory in MB to allocate to Oracle.
If you bump this up too much you might need to change your Docker settings to allocate more memory to Docker. 19c only. (default: 2048)
-e ORACLE_CHARACTERSET:
The character set to use when creating the database (default: AL32UTF8)
-v /opt/oracle/oradata
Expand Down
4 changes: 4 additions & 0 deletions OracleDatabase/SingleInstance/dockerfiles/19.3.0/createDB.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ export ORACLE_PDB=${2:-ORCLPDB1}
export ORACLE_PWD=${3:-"`openssl rand -base64 8`1"}
echo "ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: $ORACLE_PWD";

# Total memory in MB to allocate to Oracle
export ORACLE_MEM=${ORACLE_MEM:-2048}

# Replace place holders in response file
cp $ORACLE_BASE/$CONFIG_RSP $ORACLE_BASE/dbca.rsp
sed -i -e "s|###ORACLE_SID###|$ORACLE_SID|g" $ORACLE_BASE/dbca.rsp
sed -i -e "s|###ORACLE_PDB###|$ORACLE_PDB|g" $ORACLE_BASE/dbca.rsp
sed -i -e "s|###ORACLE_PWD###|$ORACLE_PWD|g" $ORACLE_BASE/dbca.rsp
sed -i -e "s|###ORACLE_CHARACTERSET###|$ORACLE_CHARACTERSET|g" $ORACLE_BASE/dbca.rsp
sed -i -e "s|###ORACLE_MEM###|$ORACLE_MEM|g" $ORACLE_BASE/dbca.rsp

# If there is greater than 8 CPUs default back to dbca memory calculations
# dbca will automatically pick 40% of available memory for Oracle DB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ automaticMemoryManagement=FALSE
# Default value :
# Mandatory : NO
#-----------------------------------------------------------------------------
totalMemory=2048
totalMemory=###ORACLE_MEM###