NetBase SQL Shadowing Handbook

____________________________________________________________
ver A0195 QUEST Software, Inc. 3-1
Chapter 3
User Exits
Overview
Four different types of user exits may be used with SQL shadowing; two are considered export
user exits, and two are post user exits. If the USEREXIT option is specified on the SQLOUT
command in NBDIR, the export process, NBSQLEXP.NB, will call the userexit
(export_sql_exit) before sending the transaction to the import process on the other machine.
: NBDIR
D> SQLOUT dbe,node;PART=part1;...;USEREXIT
NetBase SQL shadowing has a way of allowing the customer to look at all updates to a DBE as
they are made. The export process can be run so that it will read the transactions out of the
logfile without sending them across to the shadow machine. In this case we say that the process
is shadowing to a pseudo-node. In order to get all updates to the local DBE, the pseudo-node
process must have a list of partition numbers; the home partition number and all the partition
numbers for the nodes that transport their updates to this node.
If the node specified is "@", a pseudo node design is anticipated, and the USEREXIT option is
assumed in the SQLOUT command. The export user exit, exprt_sql_exit is called, and if it
contains logic for node zero (the pseudo-node), that logic is performed for the DBE.
D> SQLOUT dbe,@;PART=part1;...
If the USEREXIT option is specified on the SQLIN command in NBDIR, the import process,
NBSQLIMP.NB, will call the user exit (post_sql_exit_before) before applying the transaction.
Another post user exit (post_sql_exit_after) will be called if the apply fails.
D> SQLIN dbe,node;PART=part1;...;USEREXIT
User exits Description
export_sql_exit
Export user exit for processing prior to sending the transaction
to remote nodes. This exit may include logic for pseudo-nodes
if it handles node zero (0).
post_sql_exit_before
Post user exit which processes the received transaction (on
the "remote" node) prior to applying it to the DBE.
post_sql_exit_after
Post user exit which is invoked (on the "remote" node) if the
apply fails. This user exit may send warnings to the console
and retry the apply, or it may log the troublesome transaction
and continue processing.