Can the data repository stop or start be scripted

Document ID : KB000093243
Last Modified Date : 27/04/2018
Show Technical Document Details
Question:
The section on how to restart the data repository (Vertica nodes) details the process which includes using the administration tool which is menu driven.
ttps://docops.ca.com/ca-performance-management/3-5/en/administrating/restart-ca-performance-management-component-services/restart-the-data-repository
Is there a way to do this via a script?
We would like to use this as part of our system patching tasks.
Environment:
CAPM 3.x on linux
Answer:

There is one caveat that you need to be aware of using the command line with Vertica.

Sometimes, if there is a problem starting the db, adminTools will offer some choices, like start from last good epoch.

When you use the command line, those options are not seen and the db just fails.

With that in mind, here are some commands:

Replace dbpass with your password, if different.

Start:

su - dradmin -c "/opt/vertica/bin/adminTools -t start_db -d drdata -p dbpass -i";

stop

su - dradmin -c "/opt/vertica/bin/adminTools -t stop_db -d drdata -p dbpass -i";

status

su - dradmin -c "/opt/vertica/bin/adminTools -t view_cluster";

Additional Information: