Set-SCDWRetentionPeriod

Sets the data retention period for a fact table.

Syntax

EntitySet (Default)

Set-SCDWRetentionPeriod
    [-DurationInMinutes <Int32>]
    [-EntityName <String>]
    [-ComputerName <String>]
    [-Credential <PSCredential>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

DatamartConnectionSet

Set-SCDWRetentionPeriod
    [-DatamartComputerName] <String>
    [-DatamartDatabaseName] <String>
    [-DurationInMinutes <Int32>]
    [-EntityName <String>]
    [-ComputerName <String>]
    [-Credential <PSCredential>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-SCDWRetentionPeriod cmdlet sets the data retention period, in minutes, for either a specific fact table within a specific data warehouse database or the default for fact tables within the database. Data that is eligible for grooming and older than the retention period will be groomed out of the database.

Note

This cmdlet has a bug and does not set the data retention period correctly. See detailed information.

Examples

Example 1: Set a retention period

PS C:\>Set-SCDWRetentionPeriod -ComputerName "serverDW72" -DatamartComputerName "serverDW72" -DatamartDatabaseName "CMDWDataMart" -EntityName
"ComputerHasSoftwareUpdateInstalledFact" -DurationInMinutes 1576800

This command sets a retention period.

Parameters

-ComputerName

Specifies the name of the computer on which the System Center Data Access service is running. The user account that is defined in the Credential parameter must have access rights to the specified computer. You can omit this parameter only if the System Center Data Access Service is running on the same computer that has Service Manager installed.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:CN

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

Specifies the credentials to use when you are connecting to the server on which the System Center Data Access service is running. The user account that is provided must have access to that server.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DatamartComputerName

Specifies the name of the computer on which the datamart resides. This is usually the SQL database server that services the data warehouse. If a value is not provided, the value is discovered by inspecting the warehouse configuration.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DatamartConnectionSet
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DatamartDatabaseName

Specifies the name of the datamart database. This is typically the SQL database server that services the data warehouse. The default value is the warehouse repository. You can retrieve the entities from the Staging or DataMart databases to provide a value for this parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DatamartConnectionSet
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DurationInMinutes

Specifies the duration, in minutes, before the entity is groomed.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EntityName

Specifies the entity on which to set the data retention period. You can use the Get-SCDWEntity cmdlet to retrieve entity names. To set the default for all fact tables, omit the EntityName parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

None.

This cmdlet does not generate any output.