Fast Snapshot Recovery during initial load
When a Database Reader application with recovery enabled is stopped, halts, or terminates before the initial load has completed, when you restart the application, it will resume reading tables that have not been completely written to the target. Database Reader's Restart Behavior on IL Interruption setting gives you three choices for what the writer will do:
Keep target table data (default): The application will resume loading, from the beginning, the source tables that had not yet been fully written to the target before the application was interrupted, appending the data to any target tables with partial data. This will typically result in duplicate rows in the target or the application halting with a duplicate row error, which will require manual effort (described below) to resolve. This is the default because it is the closest to the behavior of Striim 4.x, in which recovery was not supported for Database Reader.
Replace target table (recommended): Striim will drop and re-create any target tables with partial data or no data, then resume loading, from the beginning, the source tables that had not yet been fully written to the target before the application was interrupted. This option requires Create Schema to be True, and the writer must have DROP permission on tables in the target schema.
Truncate target table: Striim will delete all data from target tables with partial data or no data, then resume loading, from the beginning, the source tables that had not yet been fully written to the target before the application was interrupted. The writer must have TRUNCATE permission on tables in the target schema.
Functionally, Truncate target table is similar to Replace target table except it does not require you to give Striim permission to drop tables in the target.
If you create the Database Reader application using a wizard, to change the Restart Behavior on IL Interruption setting you must modify the application in the Flow Designer.
In detail, depending on the initial load status of each source table, after the application is restarted Striim will do the following or, in the case of Keep target table data, you must do the following.
Table status: description | Keep target table data | Replace target table | Truncate target table |
|---|---|---|---|
WAITING_TO_PROCESS: Database Reader had not read the table before the application was interrupted. | If Create Schema is True, you must manually drop the table before restarting the application. If Create Schema is False, you must manually truncate the target table before restarting the application. | Striim will drop and re-create the target table. | Striim will attempt to truncate the target table. If the table does not exist, the application will halt. |
SCHEMACREATION_COMPLETED: Create Schema is True and the table has been created in the target, but Database Reader had not started reading the table's data before the application was interrupted. | You must manually truncate the target table before restarting the application. (Writing data may have begun even though the status had not yet changed to IL_INPROGRESS.) | Striim will drop and re-create the target table | Striim will truncate the empty target table. |
IL_INPROGRESS: Database Reader was reading the table when the application was interrupted. | You must manually truncate the target table before restarting the application. | Striim will drop and re-create the target table | Striim will attempt to truncate the target table. If the table does not exist, the application will halt. |
IL_COMPLETED: The table was fully written to the target before the application was interrupted. | No action required. | Database Reader will not read the table again. | Database Reader will not read the table again. |
There is no difference in this behavior when Enable Partition-Aware Read is enabled. If one or more partitions have been read before a restart, Striim will still start from the beginning and re-read all partitions.