Dela via


SQL Server Persistence Database

The Microsoft AppFabric 1.1 for Windows Server Configuration Wizard lets you create and initialize a SQL Server persistence store and register the persistence store in the root Web.config file. The wizard also lets you associate Windows groups with the persistence-related SQL roles. See Windows Server AppFabric Persistence Store Configuration Dialog Box for more information.

The wizard uses the Initialize-ASPersistenceSqlDatabase cmdlet to perform the initialization. You can use this cmdlet directly to create all persistence-related artifacts in a SQL Server database. The cmdlet creates the database if the database you specified as a parameter for this cmdlet does not already exist. The Remove-ASPersistenceSqlDatabase cmdlet removes all the persistence-related artifacts from the database you specify as a parameter to the cmdlet, but does not delete the database itself. For more information, see Database Administration.

Public Views and Stored Procedures

The following tables describe AppFabric public views and stored procedures in the SQL Server persistence database that you can use. See Persistence Database Schema (https://go.microsoft.com/fwlink/?LinkId=183729) for information about public views supported by the .NET Framework 4.

Views

View name View description

[Microsoft.ApplicationServer.DurableInstancing].[StoreVersion]

Retrieves AppFabric version number and the time at which AppFabric artifacts were installed.

A client can use this view to determine whether AppFabric is installed on the computer and the version of AppFabric.

[Microsoft.ApplicationServer.DurableInstancing].[InstanceControlCommands]

Retrieves the command ID, ID of the workflow service instance against which the command was issued, type of command (suspend, resume, terminate, and so on), number of times the Workflow Management Service (WMS) tried to execute the command, date and time at which the command was last executed, name of the computer on which the command execution was last tried, and any exception returned by the WMS at the last execution try.

The commands returned by this view are the commands that are about to be executed or currently being executed.

[Microsoft.ApplicationServer.DurableInstancing].[AbandonedInstanceControlCommands]

Retrieves the command ID, ID of the workflow service instance against which the command was issued, type of command, number of times the WMS has tried to execute the command, date and time at which the command was last executed, name of the computer on which the command execution was last tried, and any exception returned by the WMS at the last execution try.

The commands returned by this view are the commands that the WMS has abandoned (given up on executing).

Stored Procedures

Stored procedure name Stored procedure description

[Microsoft.ApplicationServer.DurableInstancing].[EnqueueWorkflowInstanceControlCommand]

Enqueues commands (adds commands) to a command queue maintained in the persistence store. Returns 0 on success, 1 if the workflow service instance against which the command was issued does not exist, 2 if the command is not recognized, and 3 if a control command already exists for the instance.

When you use a control cmdlet such as Suspend-ASAppServiceInstance, the cmdlet invokes a method of the instance control provider, which in turn invokes this stored procedure to enqueue the command. For more information, see Instance Store, Query, and Control Providers.

[Microsoft.ApplicationServer.DurableInstancing].[DequeueWorkflowInstanceControlCommands]

Dequeues commands (removes commands) from a command queue in the persistence store.

The Workflow Management Service invokes a method of the instance control provider, which in turn invokes this stored procedure to dequeue a control command from the command queue. For more information, see Workflow Management Service.

[Microsoft.ApplicationServer.DurableInstancing].[CompleteCommandsExecution]

Completes commands upon receiving a request from an instance control provider.

The completion process performs several functions including deleting a command from the command queue if the instance control provider executed the command successfully.

[Microsoft.ApplicationServer.DurableInstancing].[CleanupAbandonedInstanceControlCommands]

Cleans up the table that contains information about abandoned instance control commands.

See Also

Concepts

Database Administration

Other Resources

SQL Workflow Instance Store

  2012-09-12