Export (0) Print
Expand All
Expand Minimize

Initialize-ASPersistenceSqlDatabase

Initialize-ASPersistenceSqlDatabase

Create a SQL Server persistence database.

Syntax

Parameter Set: DatabaseName
Initialize-ASPersistenceSqlDatabase -Database <String> [-Admins <String> ] [-Force] [-Readers <String> ] [-Server <String> ] [-Users <String> ] [ <CommonParameters>]


Detailed Description

This cmdlet checks for the existence of the persistence database specified as a parameter. If the database exists, it also checks for the existence of the Framework version table and the AppFabric version table. The cmdlet performs the following operations:

If the database does not exist, the cmdlet creates a new SQL Server persistence database with the specified name on the specified database server and then creates .NET and AppFabric persistence related artifacts.

If the database already exists but does not contain the .NET Framework table and AppFabric version table, the cmdlet prompts you for a confirmation and installs .NET Framework and AppFabric artifacts in the database upon confirmation.

If the database already exists and contains the .NET Framework version table but does not contain AppFabric version table, the cmdlet prompts you for confirmation and installs AppFabric artifacts in the database upon confirmation.

If the database already exists and contains both .NET Framework and AppFabric version tables, but the major, minor, and build version numbers of the installed database don’t match the version number of the cmdlet, the cmdlet returns an error message stating that the database versions don’t match.

If the database already exists, contain both .NET Framework and AppFabric version tables, and major, minor, and build version numbers of the installed database match the version numbers of the cmdlet, the cmdlet does not install any artifacts into the database, but it adds the Windows groups passed as parameters to the corresponding SQL roles.

Parameters

-Admins<String>

Specifies a list of Windows groups to be added to the SQL Server roles: Microsoft.ApplicationServer.DurableInstancing.WorkflowAdministrators, Microsoft.ApplicationServer.DurableInstancing.WorkflowManagementServiceUsers, System.Activities.DurableInstancing.InstanceStoreObservers, and System.Activities.DurableInstancing.WorkflowActivationUsers. To specify multiple Windows groups, use a comma separated list. This is an optional parameter.

If you are running this cmdlet to initialize a persistence database on a domain controller (DC) and you are specifying groups on the DC, use <domain name>\<group name> syntax.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-ConnectionString<String>

The connection string that SQL Server persistence provider uses to connect to the persistence database. Example: “Data Source=(local);Initial Catalog=PersistenceDB;Integrated Security=True".


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-Database<String>

Name of the persistence database. This parameter is a required parameter if –ConnectionString is not specified; otherwise, it is an optional parameter.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-Force

If specified, an action that is attempted is performed even if restrictions are encountered (as long as security is not compromised). This is an optional parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-Readers<String>

Specifies a list of Windows groups to add to theSystem.Activities.DurableInstancing.InstanceStoreObserversSQL role. To specify multiple Windows groups, use a comma separated list. This is an optional parameter.

If you are running this cmdlet to initialize a persistence database on a domain controller (DC) and you are specifying groups on the DC, use <domain name>\<group name> syntax.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-Server<String>

Specifies the database server on which the database needs to be created. The default value is “localhost”. You must not specify this parameter if the –ConnectionString is specified. This is an optional parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-Users<String>

Specifies a list of Windows groups to add to theSystem.Activities.DurableInstancing.InstanceStoreUsersSQL role. To specify multiple Windows groups, use a comma separated list. This is an optional parameter.

If you are running this cmdlet to initialize a persistence database on a domain controller (DC) and you are specifying groups on the DC, use <domain name>\<group name> syntax.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • None.


Examples

Example 1

Creates and initializes a persistence database


Initialize-ASPersistenceSqlDatabase –Database “PersistenceDB” –Server “contosoDBserver” –Admins “CONTOSO\AppServerAdmins” –Readers “CONTOSO\AppServerReaders” –Users “CONTOSO\AppServerUsers”

Example 2

Creates and initializes a persistence database using a connection string.


Initialize-ASPersistenceSqlDatabase –ConnectionString “Data Source=contosoDBserver; Initial Catalog= PersistenceDB1; User ID=me; Password=pass@word1” –Admins “CONTOSO\AppServerAdmins” –Readers “CONTOSO\AppServerReaders” –Users “CONTOSO\AppServerUsers” -force

Example 3

Adds new security roles to an existing .NET Framework 4.0 persistence store with explicit user confirmation.


Initialize-ASPersistenceSqlDatabase –Database “PersistenceDB1” –Server “contosoDBserver” –Admins “CONTOSO\AppServerAdmins” –Readers “CONTOSO\AppServerReaders” –Users “CONTOSO\AppServerUsers”Existing .NET 4.0 Persistence Store encountered – do you wish add new security roles (Y/N)? YUpdate completed.
Show:
© 2014 Microsoft