SQL Remote event-hook procedures

The following stored procedure names and arguments provide the interface for customizing synchronization at SQL Remote databases.

Notes

Unless otherwise stated, the following apply to event-hook procedures:

  • The stored procedures must have DBA authority.
  • The procedure must not commit or rollback operations, or perform any action that performs an implicit commit. The actions of the procedure are automatically committed by the calling application.
  • You can troubleshoot the hooks by turning on the Message Agent verbose mode.
The #hook_dict table

The #hook_dict table is created immediately before a hook is called using the following CREATE statement:

CREATE table #hook_dict(
name VARCHAR(128) NOT NULL UNIQUE,
value VARCHAR(255) NOT NULL );

The Message Agent uses the #hook_dict table to pass values to hook functions; hook functions use the #hook_dict table to pass values back to the Message Agent.


sp_hook_dbremote_begin
sp_hook_dbremote_end
sp_hook_dbremote_shutdown
sp_hook_dbremote_receive_begin
sp_hook_dbremote_receive_end
sp_hook_dbremote_send_begin
sp_hook_dbremote_send_end
sp_hook_dbremote_message_sent
sp_hook_dbremote_message_missing
sp_hook_dbremote_message_apply_begin
sp_hook_dbremote_message_apply_end