Logging in to the database in IBM Software Hub
You can log in to the database from any application server pod. After you log in, you can run SQL commands by using CLPPlus.
Procedure
- Log in to any of the application server
pods. Use one of the following methods:
- Using the web client
- In the Red Hat® OpenShift® console, go to an application server pod and open a terminal.
- Using the command line
-
- Log in to your Red Hat
OpenShift cluster as an instance
administrator:
oc login OpenShift_URL:port - Change to the project where the IBM® Software Hub
control plane is
installed:
oc project ${PROJECT_CPD_INST_OPERANDS} - Log in to the application server pod and open a
terminal:
oc exec -it openpages-<instance_name>-sts-<N> -- /bin/bashTo find the pod name, run
oc get stsand look for a name that starts withopenpages-.
- Log in to your Red Hat
OpenShift cluster as an instance
administrator:
-
Log in to the database by running the following commands:
- If you're using an internal database:
-
clpplus -nw openpage/$(cat /var/run/op-secrets/op-db-secret/openpage-pw)@OPX - If you're using an external Db2 database:
-
source /opt/ibm/OpenPages/bin/provision-dbsecrets.sh clpplus -nw openpage/${OPDB_PASSWORD}@EXTDB - If you're using an external Oracle database:
-
source /opt/ibm/OpenPages/bin/provision-dbsecrets.sh sqlplus <openpages_db_user>/<openpages_db_password>@<openpages_db_alias>
You are now logged in to the database and you can run SQL commands.