MaksymBilenko / docker-oracle-12c

:whale: Docker image with Oracle Database 12c on board
Apache License 2.0
680 stars 285 forks source link

Windows 10 data directory issue #74

Closed DeonNel1 closed 6 years ago

DeonNel1 commented 6 years ago

I am trying to run this image in windows 10 and give it a data directory to write to. For some reason the data never gets written to the data directory and as a result I have to setup the db everytime my computer restarts... The command I run:

docker run -d -p 8080:8080 -p 1521:1521 -v C:/data/docker/sath80-oracle-12c sath89/oracle-12c

i've tried pointing to a FAT32 formatted flash drive but that didn't work, docker became unresponsive and I had to restart... Am I missing anything here? I tried using \ and \ as directory separators in the file path but only managed to get / to run without errors...

MaksymBilenko commented 6 years ago

You need to mount data files to the unix like file systems. I suggest you to use docker's VM volume for data files. To use it you need to use volume name instead of path at host. docker run -d -p 8080:8080 -p 1521:1521 -v sath80-oracle-12c:/u01/app/oracle sath89/oracle-12c

Datafiles in that case would be stored inside of docker VM witch has Unix-like fs.

DeonNel1 commented 6 years ago

@MaksymBilenko Thanks for the quick reply. When I try that I get the following error:

found files in /u01/app/oracle/oradata Using them instead of initial database ORA-01078: failure in processing system parameters @LRM-00109: could not open parameter file '/u01/app/oracle/product/12.1.0/xe/dbs/initxe.ora' Starting web management console BEGIN DBMS_XDB.sethttpport(8080); END;

* ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0

[IMPORT] Not a first start, SKIPPING Import from Volume '/docker-entrypoint-initdb.d' [IMPORT] If you want to enable import at any state - add 'IMPORT_FROM_VOLUME=true' variable

Database ready to use. Enjoy! ;)

611721769 commented 6 years ago

I am also getting the same error. PFB logs from /u01/app/oracle/cfgtoollogs/dbca/xe/xe.log :-

The specified shared pool size or SGA size "297MB" does not meet the recommended minimum size requirement "331MB". This will make database creation fail. Do you want to continue?

Unique database identifier check passed.

/u01/app/oracle/ has enough space. Required space is 6140 MB , available space is 11473 MB. File Validations Successful. Copying database files DBCA_PROGRESS : 1% DBCA_PROGRESS : 2% ORA-00821: Specified value of sga_target 300M is too small, needs to be at least 364M ORA-01078: failure in processing system parameters

DBCA_PROGRESS : 4% ORA-01034: ORACLE not available

ORA-01034: ORACLE not available

DBCA_PROGRESS : DBCA Operation failed.