IBM Maximo: Changing the Database in IBM Maximo Application Suite (MAS)
Jump to navigation
Jump to search
This guide explains how to change or reconfigure the database connection for IBM Maximo Application Suite (MAS) Manage application.
When you need to change the database configuration for MAS Manage, you must stop all MAS Manage deployments, verify database connections are closed, and then reconfigure the JDBC connection settings.
Procedure
1. Stop Maximo Manage Application
First, access the Manage maxinst pod and stop the Maximo application:
export MAXINST=masdemo
# Switch to the MAS Manage namespace
oc project mas-$MAXINST-manage
# List pods to find the maxinst pod
oc get pods
# Remote shell into the maxinst pod
oc rsh <instance-id>-<workspace-id>-manage-maxinst-<pod-hash>
# Example: oc rsh masdemo-maslocal-manage-maxinst-66998dbd64-vwshn
# Inside the pod, stop Maximo
./managestop.sh
wait until, <instance-id>-<workspace-id>-manage-<pod-hash> not available
oc get pods
NAME READY STATUS RESTARTS AGE ... masdemo-maslocal-all-779b7864d6-lcmqp 2/2 Running 0 363d masdemo-maslocal-manage-maxinst-66998dbd64-vwshn 1/1 Running 6 363d
2. Scale Down All Deployments
Scale down all deployments in the MAS Manage namespace to ensure no active connections:
# Scale down all deployments to 0 replicas
oc scale deployment --all --replicas=0 -n mas-<instance-id>-manage
# Example: oc scale deployment --all --replicas=0 -n mas-masdemo-manage
Update JDBC Settings
System Wide
Backup current configuration:
# backup current config
oc get secret masdemo-maslocal-jdbccfg-system-binding -n mas-masdemo-manage -o yaml > backup-masdemo-maslocal-jdbccfg-system-binding.yaml
Apply new settings:
# New values - EDIT THESE
NEW_USERNAME="db2inst1"
NEW_PASSWORD="db2inst1"
NEW_URL="jdbc:db2://c-db2mas-db2u-engn-svc.db2u.svc:50000/MAXDB"
NEW_SSL="false"
# Encode to base64
ENCODED_USERNAME=$(echo -n "${NEW_USERNAME}" | base64)
ENCODED_PASSWORD=$(echo -n "${NEW_PASSWORD}" | base64)
ENCODED_URL=$(echo -n "${NEW_URL}" | base64)
ENCODED_SSL=$(echo -n "${NEW_SSL}" | base64)
# Create temporary YAML file
cat > jdbc-secret.yaml <<EOF
apiVersion: v1
kind: Secret
metadata:
name: masdemo-maslocal-jdbccfg-system-binding
namespace: mas-masdemo-manage
type: Opaque
data:
username: ${ENCODED_USERNAME}
password: ${ENCODED_PASSWORD}
url: ${ENCODED_URL}
sslenabled: ${ENCODED_SSL}
EOF
# Apply the secret
oc apply -f jdbc-secret.yaml
5. Scale Up Required Deployments
After updating the database configuration, scale up the necessary deployments:
export MAS_INST=masdemo
export MAS_WKSP=maslocal
# Scale up operators and core services
oc scale deployment ibm-mas-imagestitching-operator --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ibm-mas-manage-operator --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ibm-mas-slackproxy-operator --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ibm-truststore-mgr-controller-manager --replicas=1 -n mas-${MAS_INST}-manage
# Scale up entity managers
oc scale deployment ${MAS_INST}-entitymgr-acc --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ${MAS_INST}-entitymgr-appstatus --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ${MAS_INST}-entitymgr-bdi --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ${MAS_INST}-entitymgr-primary-entity --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ${MAS_INST}-entitymgr-ws --replicas=1 -n mas-${MAS_INST}-manage
# Scale up sync agents
oc scale deployment ${MAS_INST}-groupsyncagent --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ${MAS_INST}-usersyncagent --replicas=1 -n mas-${MAS_INST}-manage
# Scale up health and monitoring
oc scale deployment ${MAS_INST}-healthext-entitymgr-ws --replicas=1 -n mas-${MAS_INST}-manage
oc scale deployment ${MAS_INST}-monitoragent --replicas=1 -n mas-${MAS_INST}-manage
# Scale up Maximo instance
oc scale deployment ${MAS_INST}-${MAS_WKSP}-manage-maxinst --replicas=1 -n mas-${MAS_INST}-manage