Determine if database is up #179
-
Just started using this package under Docker running on AlmaLinux 8. Have reached the point where the DB container is fired off, local user created etc. But I have one question. When the container is started (initially) or after a stop and start, it seems to take (on my setup) about 2-3 mins before sqlplus from the host is able to connect to XEPDB1. Is there a docker command that will easily tell me when the DB is up and the listener is ready to accept connections? --prasanna |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @pmulgaonkar, Thanks a lot for using these images! The container provides a For example:
|
Beta Was this translation helpful? Give feedback.
Hey @pmulgaonkar,
Thanks a lot for using these images!
The container provides a
healthcheck.sh
script that will tell you the state of the database. Depending on your requirements, you can invoke it from the shell or other script to see whether the database is up or not. If the database instance is up, it will return0
, otherwise1
.For example: