Teilen über


PersistentState

Specifies whether the resource should be brought online or left offline when the Cluster service is started. The following table summarizes the attributes of the PersistentState property.

Attribute Value
Data type DWORD
Access Read/write
Structure CLUSPROP_DWORD
Minimum FALSE
Maximum TRUE
Default FALSE

Remarks

The data value for the PersistentState property can be set to TRUE or FALSE. When PersistentState is set to TRUE, the resource is automatically brought online when the Cluster service starts. When set to FALSE, it is left offline.

When a resource is brought online, its PersistentState property is deleted from the cluster database. Therefore, PersistentState should only be set when a resource is offline.

To retrieve the current state of a resource, call the GetClusterResourceState function.

Examples

The property value portion of a property list entry for PersistentState can be set with the following example code:

DWORD          PersistentStateData = FALSE;
CLUSPROP_DWORD PersistentStateValue;

PersistentStateValue.Syntax.dw = CLUSPROP_SYNTAX_LIST_VALUE_DWORD;
PersistentStateValue.cbLength  = sizeof(DWORD);
PersistentStateValue.dw        = PersistentStateData;

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

See also

CLUSPROP_DWORD

GetClusterResourceState