In the Restore Request Editor, select Insert as the Restore Process option.
An Insert or Load Request is required to restore data from each Archive File. You can list several Insert or Load Requests, and provide criteria to match each restored Archive File with the appropriate Insert or Load Request. Use the Request Selection Mode options to specify the type of criteria.
During processing, each Archive File is compared with the listed Insert or Load Requests, according to the Request Selection Mode criteria. The first request that matches the criteria is used to restore the data in that Archive File. If no match is found, data from the Archive File is not restored, and an error occurs.
You use the Request Selection Mode box to select a mode and provide criteria for each listed Insert or Load Request, as follows:
When you select Data Model, each Archive File is compared to the Archive File (or Extract File) specified as the source in each listed Insert or Load Request until a match is found. The Archive File referenced in the Insert or Load Request must exist. The two Archive Files match if:
The first listed Insert or Load Request that meets these conditions is used to restore data in the Archive File. The data model is the only criteria for this selection mode. The description associated with each listed Insert or Load Request is displayed for reference.
When you specify Date as the selection mode, you must enter a Start date and an End date for each listed Insert or Load Request. Click the down arrow to select a date from a calendar. The creation date of each Archive File is compared with the date criteria you specify for an Insert or Load Request. If the date falls within the range, the Insert or Load Request is used to restore data in the Archive File.
When you specify Description as the selection mode, you must enter a description for each listed Insert or Load Request. The description contained in each Archive File is compared with the description you specify for each Insert or Load Request. If the description matches, the Insert or Load Request is run to restore the data in the Archive File.
When you specify Group as the selection mode, you must enter a group name for each listed Insert or Load Request. The group name contained in each Archive File is compared with the group name you specify for each Insert or Load Request. If the group name matches, the Insert or Load Request is run to restore the data in the Archive File.
For this scenario, select Data Model as the request selection mode.
You can use an existing Insert Request, or create a new Insert Request. A named Insert Request is stored in the Directory and can be used in other processes; a local Insert Request is stored with the Restore Request and is not available to other processes.
To list an existing Insert Request, right-click the Insert Request(s) grid and click from the shortcut menu to open the Select an Insert Request dialog. The submenu also provides selections that open the Insert Request Editor, populated with the most recent entries, to allow you to create a new named or local Insert Request. For this scenario, however, you will create a local Insert Request, based on the Archive File listed on the Restore Request.
In the Archive Files grid, right-click the file name and click from the shortcut menu. The Insert Request Editor is displayed.
You use the Insert Request Editor to create and edit Insert Requests. In the Description box, you can enter text that describes the purpose or function of the Insert Request. For this scenario, type Restore Order for Customer.
The name of the selected Archive File is inserted as the Source File. Other controls and options on the Insert Request Editor are populated with the most recent entries. The Source File serves several purposes:
When creating a new Insert Request, the Source File serves as the model for building the Table Map used with the Insert Request.
If the Insert Request Selection Mode is Data Model, the Source File provides the data model used to match the Insert Request with the Archive File in the Restore Process.
When the Insert Request Selection Mode for the Restore Process is Data Model, each Archive File to be restored is compared to the Source File in listed Insert or Load Requests until a match is found. If the Insert Request Selection Mode is not Data Model, the Date, Description, or Group for the Archive File is compared to that for listed Insert or Load Requests until a match is found.
The Control File records the success or failure of Insert Processing for each row. In this scenario, select the name of the Control File used in the Delete Process. A confirmation dialog will prompt you to overwrite the file when you run the Restore Process.
A Table Map directs the placement of data in the Restore Process by identifying and matching tables in the source, or Archive File, with those in the database. In addition, you can use a Table Map to exclude tables from processing.
Table Map Options allow you to use a named Table Map that is saved and can be used with other process requests, or a Local Table Map saved as part of the Insert Request. For this scenario, select Local to create a Local Table Map.
Delete Options let you delete rows from all or specified destination tables or retain all rows in destination tables for processing (no delete). For this scenario, use the default setting No Tables to retain rows already in the database.
Process Options allow you to select the type of Insert Processing to be performed and specify parameters to be used. You can insert new rows only; insert new rows and update existing rows; or update existing rows only. You can apply these options globally, or on a table-by-table basis.
You can also lock each table until all rows are processed, process a specified number of rows before committing the changes to the database, and discard rows until a particular number is reached and then stop the process. See Delete Options for additional information about these options.
For this scenario, ensure that Insert is selected, clear the Lock Tables check box, clear the Commit Frequency box to use the maximum Product Options limit, and specify 0 for Discard Row Limit.
The remaining options, Process File Attachments, Disable Triggers, Disable Constraints, and Always Call Create, do not apply to this scenario. Retain the default settings.
At this point in the scenario, edit the Table Map to specify how the Restore Process is to place data within the destination tables.
A Table Map matches the source tables in the Archive File to the destination tables in the database. You can also use a Table Map to exclude tables from the Restore Process.
In the Insert Request Editor, click from the menu to display the Table Map Editor.
The Source Archive File name and the qualifier for tables in the Archive File are displayed. You must provide a Destination Qualifier to identify the destination tables. To prefix the table names in the Table Map, enter the dbalias and creatorid that correspond to the sample database tables.
A description can be a useful way to identify a Table Map. For this scenario, type Map ORDERS and DETAILS.
Using the grid on the Tables tab, you can match source tables in the Archive File to destination tables in the database. Archive initially populates the Destination Table column with names of tables for which Delete Rows after Archive was selected in the Access Definition used to create the source Archive File.
To restore archived rows to the ORDERS and DETAILS database tables, verify that the Table Map matches:
To exclude the ITEMS and CUSTOMERS tables from processing, verify that the destination table cells for source tables ITEMS and CUSTOMERS are blank.
When finished, click from the menu to return to the Insert Request Editor. Then click from the menu on the Insert Request Editor to return to the Restore Request Editor.