Two useful batch files when testing with Windows Workflow Foundation

The following are two batch files I use a lot when working with WF persistence and or tracking as I find it desirable to clear the out often. Just drop them in the “C:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation\SQL\EN” directory with the four SQL scripts and recreating the required databases is just a few clicks away.


osql -E -S .\sqlexpress -Q “Drop Database WorkflowPersistence”
osql -E -S .\sqlexpress -Q “Create Database WorkflowPersistence”
osql -E -S .\sqlexpress -d WorkflowPersistence -i SqlPersistenceService_Schema.sql
osql -E -S .\sqlexpress -d WorkflowPersistence -i SqlPersistenceService_Logic.sql



osql -E -S .\sqlexpress -Q “Drop Database WorkflowTracking”
osql -E -S .\sqlexpress -Q “Create Database WorkflowTracking”
osql -E -S .\sqlexpress -d WorkflowTracking -i Tracking_Schema.sql
osql -E -S .\sqlexpress -d WorkflowTracking -i Tracking_Logic.sql


Of course you could also use my SqlCeWFPersistence as the persistence service, download it from here. I never did create a TrackingService based upon SQL Compact but if enough people are interested I might just do so [:)]



Leave a Reply

Your email address will not be published. Required fields are marked *