Dela via


Clearing the Instance Persistence Database

This sample is a T-SQL file that clears all workflow instance data from the persistence store without removing any SQL Server user roles.

Note

Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples.

Prerequisites

  • An initialized persistence store with workflow instance data.

Sample Location and Files

A readme document is located in <samples>\Samples\Hosting\ClearPersistenceDatabase.

All files that you will need to run this sample are located in <samples>\Samples\Hosting\ClearPersistenceDatabase:

  • ClearPersistenceDatabase.sql is a T-SQL file that, when run against a persistence store, removes all workflow instance data from the store.

Setting Up and Running This Sample

  1. Create a persistence store with instance data.

  2. Load SQL Server Management Studio and connect to the database that contains workflow instance data.

  3. Run the T-SQL file by clicking Execute at the top of the window, or by pressing F5.

    Note

    You can also run the T-SQL file by using SQLCMD.

    Warning

    Running this T-SQL File will permanently erase all workflow data stored in the database. This file is intended to be used only in a private development environment.

  2012-09-12