execute
execute <statement> [-json] [-wait]
Oracle NoSQL Database provides a way to run Data Definition Language (DDL) statements used to form table and index statements. Using the
execute
command runs each statement you specify synchronously. You must enclose each DDL statement in single or double quotes. You must connect to a database store before using the execute command.
Note:
All DDL commands from the Admin CLI, includingexecute
, are deprecated. Use the SQL for Oracle NoSQL Database Shell to execute this command. For more information, see Appendix A Introduction to the SQL for Oracle NoSQL Database Shell.
For example:
kv-> plan execute -id 19 -json -wait
{
"operation" : "plan deploy-zone -name zn6 -rf 1 -type PRIMARY -no-arbiters -no-master-affinity",
"returnCode" : 5000,
"description" : "Operation ends successfully",
"returnValue" : {
"id" : 19,
"name" : "Deploy Zone",
"isDone" : true,
"state" : "SUCCEEDED",
"start" : "2024-04-05 09:35:31 UTC",
"interrupted" : null,
"end" : "2024-04-05 09:35:31 UTC",
"error" : null,
"executionDetails" : {
"taskCounts" : {
"total" : 1,
"successful" : 1,
"failed" : 0,
"interrupted" : 0,
"incomplete" : 0,
"notStarted" : 0
},
"finished" : [ {
"taskNum" : 1,
"name" : "Plan 19 [Deploy Zone] task [DeployDatacenter zone=zn6]",
"state" : "SUCCEEDED",
"start" : "2024-04-05 09:35:31 UTC",
"end" : "2024-04-05 09:35:31 UTC"
} ],
"running" : [ ],
"pending" : [ ]
},
"planId" : 19,
"zoneName" : "zn6",
"zoneId" : "zn4",
"type" : "PRIMARY",
"rf" : 1,
"allowArbiters" : false,
"masterAffinity" : false
}
}