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 a project
administrator:
oc login OpenShift_URL:port
- Change to the project where the Cloud Pak for Data control plane
is installed:
oc project <Project>
- Log in to the application server pod and open a
terminal:
oc exec -it openpages-<instance_name>-sts-<N> -- /bin/bash
To
find the pod name, run oc get sts
and look for a name that starts with
openpages-
.
-
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 database:
-
source /opt/ibm/OpenPages/bin/provision-dbsecrets.sh
clpplus -nw openpage/${OPDB_PASSWORD}@EXTDB
You are now logged in to the database and you can run SQL
commands.