Illustration repma008.gif shows an example of asynchronous procedural replication. The example shows the following procedure call:

defer_emp_mgmt.new_dept('Jones', 'Y', 'Y')

The example includes the following elements:

Wrapper Procedure Code Sample

new_dept(args...)

if call_local='Y'
    call new_dept(Jones)
if call_remote='Y'
    build call to new_dept
        for deferred queue
        with call_remote='N'

Deferred Transaction Queue

The following are entered under procname:

update(oldargs newargs)
insert(newargs)
update(oldargs newargs)
delete(oldargs)
new_dept(Jones)

Replication Sites

At both replication site A and replication site B, the procdure is called and the employees table is updated. The procedure call is similar to the following:

new_dept(arg1)
BEGIN
    lock table in EXCLUSIVE mode
    disable row-level replication
    update employees
    enable row-level replication
END;