oracle/docker-images

Reuse Existing Database Files When Re-creating an Oracle 19c Container

yuyangyumi opened this issue · 4 comments

When I have already built an Oracle 19c image and created a container with the data directory mounted into it. Later, I removed the container but kept the database files in the data directory. Now, I would like to recreate a new Oracle 19c container, mount it to the previous data directory, and ensure that the new container can use the existing database files instead of initializing the database again. I am seeking to know if there is a way to achieve this.

You just have to mount the same data directory on to the new container. Is that not working?

Yes, when I need to reuse existing Oracle 19c database files instead of creating them again, I want to mount the directory containing these files to a new container.

You just have to mount the same data directory on to the new container. Is that not working?

Okay I am not understanding your issue here. Can you explain what is problem that you are seeing?

Thank you very much for your help, I appreciate it. I have realized that it was my mistake. The initial initialization process was too slow, and I interrupted it midway, resulting in an incomplete database. Therefore, it will reinitialize the database.