SQL Guide : solidDB® SQL statements : MESSAGE : MESSAGE BEGIN
  
MESSAGE BEGIN
MESSAGE unique_message_name BEGIN [TO master_node_name]
Usage
The MESSAGE BEGIN statement is used to explicitly begin each message that is sent from a replica to the master database. The MESSAGE BEGIN statement is applicable only in advanced replication configurations. It can only be issued on the replica databases.
Each message must have a name that is unique within a replica. To construct unique message names, you may use the GET_UNIQUE_STRING() function, which is documented in String functions. After a message has been processed, that message name may be reused. However, if the message fails for any reason, the master will keep a copy of the failed message, and if you try to reuse the message name before you delete the failed message, then the name will not be unique. You may want to use a new message name even in situations where you might be able to re-use an existing name. Note that it is possible for two replicas of the same master to have the same message name.
When registering a replica to a master catalog, other than the master system catalog, you must provide the master node name in the MESSAGE BEGIN command. The master node name is used to resolve the correct catalog at the master database. Note that specifying a master node name only applies when using the REGISTER REPLICA statement. Later messages are automatically sent to the correct master node.
If you use the optional “TO master_node_name” clause, then you must put double quotation marks around the master_node_name.
Note:
When working with messages, be sure the autocommit mode is always switched off.
Return values from replica
Error code
Description
25005
Message message_name is already active.
A message of the specified name was created and appears to still be active. The message is automatically deleted when the reply of the message has been successfully executed in the replica.
25035
Message message_name is in use.
A user is currently creating or forwarding this message.
25056
Autocommit not allowed
Return values from master
Error code
Description
25019
Database is not a replica database.
25025
Node name not defined.
25056
Autocommit not allowed
Examples
MESSAGE MyMsg0001 BEGIN ;
MESSAGE MyMsg0002 BEGIN TO "BerkeleyMaster";
See also
MESSAGE