Shutdown and Startup command on SQL Container

Hi,

How to run the “SHUTDOWN IMMEDIATE” and “STARTUP MOUNT” command on an SQL container?

I’m trying to run it on this command:
“docker exec -it sqlplus sys/<your_password>@<your_SID> as sysdba”

When I run the SHUTDOWN IMMEDIATE", I cannot run “STARTUP MOUNT” because the container will exit.

Thank you for answering! :slight_smile:

As we say it frequently, a container is not a virtual machine. You can’t stop the process that keeps the container alive. In other words the container is the isolated environment of a process, but the environment can’t exist without the process. You can run docker stop and docker start and never execute a shutdown/stop commands in a container.

By the way if you really expect answers, it is better to share what some details about the commands you run, because not everyone knows what those commands do. Not to mention choosing the right categories.

You added the tag “dockerhub”. How is it related to that? And “mysql”? sqlplus connects to Oracle databases, which isn’t mentioned. And how is the question related to “docker” and “lxc-container” as well?

I also also don’t think you are running “windows-container”, at least I haven’t heard about Oracle Database in windows containers, but even if it exists, lxc-container exists only on Linux.

Now, I hope you see why it makes less likely to get a useful answer.

1 Like