1.1

Table Of Contents
Syntax
SYS.ATTACH_WRITER
(
IN SCHEMA_NAME VARCHAR(128) NOT NULL,
IN TABLE_NAME VARCHAR(128) NOT NULL,
IN FUNCTION_STRING VARCHAR() NOT NULL,
IN IN-IT_INFO_STR VARCHAR(),
IN SERVER_GROUPS VARCHAR()
)
Description
The writer should be an implementation of the EventCallback interface. The onEvent method of the implementation
is invoked before an event (such as an insert, update or delete) occurs on the table. Only one writer can be attached
to a table. If a writer is already attached to a table, then the new writer replaces the previous one.
Example
The following code adds an example writer implementation to a table. Example Writer
Implementation on page 192 shows the writer code.
Connection conn = getConnection();
CallableStatement cs = conn
.prepareCall("CALL SYS.ATTACH_WRITER(?,?,?,?,?)");
cs.setString(1, test);
cs.setString(2, table);
cs.setString(3, testpackage.EventCallBackWriterImpl);
cs.setString(4, emp.ftable:3);
cs.setString(5, null);
cs.execute();
SYS.REBALANCE_ALL_BUCKETS
Rebalance partitioned table data on available SQLFire members.
Syntax
SYS.REBALANCE_ALL_BUCKETS()
Rebalancing is a SQLFire member operation that affects partitioned tables created created in the cluster.
Rebalancing performs two tasks:
1. If the a partitioned table's redundancy setting is not satised, rebalancing does what it can to recover
redundancy. See Making a Partitioned Table Highly Available on page 66.
2. Rebalancing moves the partitioned table's data buckets between host members as needed to establish the best
balance of data across the distributed system.
For efciency, when starting multiple members, trigger the rebalance a single time, after you have added all
members.
Rebalancing Partitioned Data on SQLFire Members on page 66 provides additional information about the
rebalancing operation.
Example
sqlf> call sys.rebalance_all_buckets();
SYS.REMOVE_LISTENER
Remove a listener implementation that you previously added to a table.
599
SQL Language Reference