ifx_grid_remove() function

The ifx_grid_remove() function removes any DDL statements that are deferred from propagation to grid servers.

Syntax


1  EXECUTE FUNCTION ifx_grid_remove ( ' grid_name ' , ' tag ' ) ;
Element Purpose Restrictions
grid_name The name of the grid that has a deferred DDL statement. Must be the name of an existing grid.
tag A character string to identify grid operations. Must be the same value as the tag argument that was included in the ifx_grid_connect() procedure with the defer argument.

Usage

If you deferred the propagation of DDL statements by running the ifx_grid_connect() procedure with the defer argument, DDL statements are run on the local server but deferred from propagating across the grid. If you decide to not propagate the deferred DDL statements, run the ifx_grid_remove() function to remove the deferred DDL statement. You can run the ifx_grid_remove() command at any time after the grid session in which the statements were deferred. The ifx_grid_remove() command does not roll back the DDL statements on the local server.

You must run this routine as an authorized user on an authorized server, as specified by the cdr enable grid command.

Returns

The number of DDL statements that are removed.

Example

The following example defers propagation of the ALTER operation across grid1:

database sales;

EXECUTE PROCEDURE ifx_grid_connect('grid1','tag1',4);

ALTER TABLE special_offers ADD (
	  local_restrictions	 varchar(255));

The following statement removes the queued ALTER operation:

EXECUTE FUNCTION ifx_grid_remove('grid1','tag1');

The local_restrictions column remains in the special_offers table on the local server but is not added to the special_offers tables on the other grid servers.