Dela via


Invoke-ProcessASDatabase

Conducts the Process operation on a specified Database with a specific ProcessType or RefreshType depending on the underlying metadata type.

Syntax

Invoke-ProcessASDatabase
      [-DatabaseName] <String>
      [-RefreshType] <RefreshType>
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-ProcessASDatabase
      [-DatabaseName] <String>
      [-ProcessType] <ProcessType>
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-ProcessASDatabase
      [-RefreshType] <RefreshType>
      -Database <Object>
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-ProcessASDatabase
      [-ProcessType] <ProcessType>
      -Database <Object>
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Conducts the Process operation on a specified Database with a specific ProcessType or RefreshType depending on the underlying metadata type.

Use ProcessType for database with multidimensional metadata (this includes tabular databases with compatibility level less than 1200). Use RefreshType for tabular databases with compatibility level 1200 or higher.

Module requirements: version 21+ on PowerShell 5.1; version 21 (recent preview) or version 22+ on PowerShell 7.x.

Examples

Process entire AS tabular database using name

PS SQLSERVER:\SQLAS\MachineName\Instance\Databases\DB1\> Invoke-ProcessASDatabase -DatabaseName "DB1"  -RefreshType "Full"

Process entire AS tabular database using pipeline

PS SQLSERVER:\SQLAS\MachineName\Instance\Databases\> $db = (gci "DB1")
PS SQLSERVER:\SQLAS\MachineName\Instance\Databases\> $db | Invoke-ProcessASDatabase -RefreshType "Full"

Parameters

-ApplicationId

The application Id for the service principal.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CertificateThumbprint

The certificate thumbprint for the service principal.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

If this parameter is specified, the user name and password passed will be used to connect to specified Analysis Server instance.

If no credentials are specified default windows account of the user who is running the tool will be used.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Database

Specifies the Tabular or Multidimensional database to be processed.

Type:Object
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DatabaseName

Specifies the name of the Tabular or Multidimensional database to be processed.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ProcessType

Specifies the process type for a Multidimensional database or a Tabular database at compatibility levels 1050-1103.

See Processing Options and Settings (Analysis Services) for descriptions and guidance.

Type:ProcessType
Accepted values:ProcessFull, ProcessAdd, ProcessUpdate, ProcessIndexes, ProcessData, ProcessDefault, ProcessClear, ProcessStructure, ProcessClearStructureOnly, ProcessScriptCache, ProcessRecalc, ProcessDefrag
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ProgressAction

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.

Type:ActionPreference
Aliases:proga
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RefreshType

Specifies the process type for a Tabular database.

See Process Database, Table, or Partition (Analysis Services) for descriptions and guidance.

Type:RefreshType
Accepted values:Full, ClearValues, Calculate, DataOnly, Automatic, Add, Defragment
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Server

Optionally specifies the server instance to connect to if not currently in the SQLAS Provider directory.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServicePrincipal

Specifies that this connection is using service principal.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TenantId

The tenant Id for the service principal.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.Object

Outputs

System.Object

Notes

Supported on all Analysis Services instances