Explicit Export to a Database
This approach is similar to the previous section, but differs in the destination for the data. With this approach, you can specify a database and have your workflow, and optionally SharePoint data, exported to this database. The database has a predefined schema that must be used, but you can also add additional database fields to contain additional data from the SharePoint lists.
To explicitly export workflow data to a database:
Note: This script is for SQL Server. It can easily be modified for other databases.
svadm -o updateprocessstatuslist -url <URL to the root site to export> -config <path to your database configuration file> -recurse
svadm -o updateassignmentstatuslist -url <URL to the root site to export> -config <path to your database configuration file> -recurse
The configuration file includes your database connection string and any field maps that describe the name of a SharePoint field and the corresponding name of the database field to which to copy the SharePoint data.