It's like wait-for-it.sh, but for Oracle databases.
- Go v1.18 or later
You can pass the information as command-line arguments:
./wait-for-oracle --user=<username> --password=<password> --host=<host> [--port=<port>] --sid=<sid> [--timeout=<timeout>]
You can also use environment variables to pass the information:
export ORACLE_USER=<username>
export ORACLE_PASSWORD=<password>
export ORACLE_HOST=<host>
export ORACLE_PORT=<port>
export ORACLE_SID=<sid>
export ORACLE_TIMEOUT=<timeout>
./wait-for-oracle
--user
orORACLE_USER
: Oracle database user--password
orORACLE_PASSWORD
: Oracle database password--host
orORACLE_HOST
: Oracle database host--port
orORACLE_PORT
: Oracle database port (default: 1521)--sid
orORACLE_SID
: Oracle database SID--timeout
orORACLE_TIMEOUT
: Timeout in seconds (default: 0)
If timeout is not specified or is 0, the program will wait indefinitely.
The program will either print "Connected" if the connection to the database is successful and exit with code 0, or "Timeout" if the connection could not be established within the specified timeout (exit code 1).
This program is licensed under the MIT License.