oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.47k stars 5.41k forks source link

I can't create the new user in oracle; #2702

Open 1995mars opened 10 months ago

1995mars commented 10 months ago

Run the Container

docker run --name oracle-19c -p 1521:1521 -e ORACLE_SID=orcl -e ORACLE_PWD=123456789 -v D:/Researchs/Oracle/oracle-19c/oradata/:/opt/oracle/oradata doctorkirk/oracle-19c

When i want to create the new user

sqlplus / as sysdba
CREATE USER mars IDENTIFIED BY 123456789;

An error appears:

SQL> CREATE USER mars IDENTIFIED BY 123456789;
CREATE USER mars IDENTIFIED BY 123456789
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
oraclesean commented 10 months ago

This isn't an error creating the user. The database wasn't created successfully. Try running:

docker logs oracle-19c

That should show the error generated during container and database creation.

1995mars commented 10 months ago

@oraclesean The docker log

==> /opt/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log <==
2023-09-18T14:06:55.522324+00:00
Adjusting the default value of parameter parallel_max_servers
from 640 to 72 due to the value of parameter processes (150)
Starting ORACLE instance (normal) (OS id: 637)
2023-09-18T14:06:55.528147+00:00
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 1073741824 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 67108864 and used is 0 bytes. Ensure that the mount point is /dev/shm for this directory.
2023-09-18T14:06:55.530589+00:00
memory_target needs larger /dev/shm

image

oraclesean commented 10 months ago

1073741824 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 67108864

The parameter file used to start the database is trying to set MEMORY_TARGET to a value larger than what's allocated on the system, so the database isn't starting.

The container image, doctorkirk/oracle-19c is a custom image that Oracle and the contributors in this repository don't support. I suggest contacting the author for assistance or trying with an official, Oracle-supported image.

Optionally, you can take a look at the scripts here: https://github.com/oraclesean/Oracle-on-Docker for information on modifying the Oracle repo to build a non-CDB database. I also have some repos under my profile that build images a little differently (including non-CDB, multi-PDB, etc) if you're interested in on-the-fly customizations.

1995mars commented 10 months ago

Thank for your support.