execute

execute <statement> [-json] [-wait]
Oracle NoSQL Databaseには、表および索引を生成する文に使用されるデータ定義言語(DDL)文の実行方法が用意されています。executeコマンドを使用すると、指定した各文が同期的に実行されます。各DDL文は一重引用符または二重引用符で囲む必要があります。executeコマンドを使用する前に、データベース・ストアに接続する必要があります。

注意:

管理CLIからのDDLコマンド(executeを含む)はすべて非推奨になりました。Oracle NoSQL Databaseシェル用のSQLを使用して、このコマンドを実行します。詳細は、付録A「Oracle NoSQL Databaseシェル用のSQLの概要」を参照してください。

次に例を示します。

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" : "2017-09-28 09:35:31 UTC",
		"interrupted" : null,
		"end" : "2017-09-28 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" : "2017-09-28 09:35:31 UTC",
			"end" : "2017-09-28 09:35:31 UTC"
			} ],
		"running" : [ ],
		"pending" : [ ]
		},
		"planId" : 19,
		"zoneName" : "zn6",
		"zoneId" : "zn4",
		"type" : "PRIMARY",
		"rf" : 1,
		"allowArbiters" : false,
		"masterAffinity" : false
		}
	}