Name

cl_exec — executes things on all nodes of a cluster

Synopsis

cl_exec ( in cmd varchar ,
in params any := NULL ,
in is_txn int := 0 );

Description

The cl_exec SQL function can be used for executing things on all nodes of a cluster.

Parameters

cmd

A SQL string. If it contains parameter markers (?), the params array is used for assigning values, left to right.

params

Any params.

is_txn

If set to 1, the cl_exec makes a distributed transaction and does not automatically commit on locally on each node. Thus cl_exec can be used as part of a containing distributed transaction.

Examples

Example24.90.Simple example

SQL> cl_exec ('shutdown')
--will shut all nodes.

SQL> cl_exec ('dbg_obj_print (?)', vector ('hello'));
--will print hello to the standard output of all the processes of the cluster.