cancel
Showing results for 
Search instead for 
Did you mean: 

Cloud Foundry CLI stop and start HANA Cloud Database

former_member6443
Contributor
1,397

Hi All,

I am trying to stop and start my HANA Cloud Database using Cloud Foundry CLI.

cf version 6.52.0+b086fe522.2020-08-26

I can connect using the cf login without any issues and can see the services using cf services.

I have tried both the below commands

cf update-service myerpdb-db -c '{"action":"START|STOP"}'
cf update-service myerpdb-db  -c '{"data":"serviceStopped":false}'
FAILED
Invalid configuration provided for -c flag. Please provide a valid JSON object or path to a file containing a valid JSON object.

I have not created the service instance using the Service Instance

Thanks

Afshin

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

From what terminal you are executing that command.

This will work for instance on a bash shell:

cf update-service myerpdb-db -c '{"action": "START"}'

Executing the command in e.g. a Powershell terminal requires to escape special signs like double quotes:

cf update-service myerpdb-db -c '{\"action\": \"START\"}'

Answers (2)

Answers (2)

maxstreifeneder
Product and Topic Expert
Product and Topic Expert
Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

The following tutorial demonstrates executing various administrative tasks such as start/stop/create/update/upgrade of an SAP HANA Cloud instance using the BTP and CF CLIs.


Executing SAP HANA Cloud Tasks from the Command Line