This topic provides examples on selective workflow restore and full workflow restore.
Example 5-1 Selective Workflow Restore
Let us assume the user SCOTT
had accidentally deleted all his workflows last week. You can use the ADD_ONLY
option to restore his workflows. You will have to query the backup table to determine which version of backups contain his missing workflows. I f the version is 12, then the following script example, run as SYS will reload only those workflows.
@restorexmlworkflowfrombackup2.sql ADD_ONLY BACKUPACCT BACKUPACCT.WORKFLOW_V
The WORKFLOW_V
view, shown as follows, selects all the workflows present for the user SCOTT
from a specified version backup number.
CREATE VIEW BACKUPACCT.WORKFLOW_V AS SELECT user_name, project_name, workflow_name, version FROM backupacct.odmr$workflows_backup WHERE user_name='SCOTT' AND version = 12;
Example 5-2 Full Workflow Restore
Let us assume that there was some critical repository failure that requires a full reload of all workflows from the latest backup. You can use the DROP_AND_ADD
option to insure that all the old workflows are dropped and all the workflows on the backup are reloaded. In this case, the backup table is located in another account separate from the ODMRSYS
account. The latest backup version will be used for the recovery, so no workflow definition parameter is required.
@restorexmlworkflowfrombackup2.sql DROP_AND_ADD BACKUPACCT
Parent topic: Backing Up and Restoring the Repository