The SQL/Data Synchronization
Facility (SQL/DSF) assists DB2/VSE database administrators in managing distributed
database environments. In such environments, it must be ensured that the
distributed tables remain in a consistent state. The following SQL/DSF
facilities help database administrators in achieving this goal:
|Synchronization||Propagates changes performed on DB2/VSE tables to other databases.|
|Transfer||Transfers tables between different databases.|
|Compare||Compares tables in different databases.|
|Conditional transfer||Transfers a table to the target database, when a table compare results in mismatch.|
All SQL/DSF functions are performed from the VSE/ESA DB2/VSE environment. They operate:
Synchronization implies that the source table changes have been captured in the source database. The capturing function is performed by the SQL/Auditing Facility, a program product available from Software Product Research. All SQL statements, both dynamic and compiled, are captured, regardless of their origin.
The log of the SQL/Auditing Facility contains the full text of all SQL statements captured in the DB2/VSE server. Synchronization consists in executing these statements against the target database.
Since SQL/DSF uses the captured statement for synchronization and not the DB2/VSE log, an SQL statement that alters multiple rows will be synchronized in a single transaction.
Synchronization User Exit
If requested, SQL/DSF will invoke a user exit before applying the source statements to the target database. The exit can modify the statement text or take any other appropriate action.
The transfer function copies all rows of a designated table to the target table in another database. At the user's choice, transfer will replace or append to the target. The transfer is performed using VSE subtasks: no disk or tape storage is required during the operation.
The function compares all rows of a named table with the table in the designated target database and prints the contents of the mismatching rows.
CONDITIONAL TABLE TRANSFER
The conditional transfer function is a combination of the compare and the transfer functions. A conditional transfer compares both tables and initiates a transfer when the compare results in a mismatch.
THE SQL/DSF SCHEDULER
SQL/DSF provides the SQLDSFS Scheduler program to assist an installation in setting up a DataSync Server environment. Using the Scheduler, most synchronization tasks can be automated. The Scheduler processes table synchronizations and transfers automatically and chronologically, as requested in its RULES file.