SQL Remote system procedures

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

Notes

Unless otherwise stated, the following conditions 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 system procedure
sp_hook_dbremote_end system procedure
sp_hook_dbremote_shutdown system procedure
sp_hook_dbremote_receive_begin system procedure
sp_hook_dbremote_receive_end system procedure
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