sql - SSAS Processing Cubes - Won't work in powershell but works in Visual Studio -


i'm attempting process cubes , dimensions in powershell. has been working awhile of sudden stops. can process dimensions , cubes in visual studio processing them powershell script in same order gives me duplicate attribute key error.

powershell script:

[system.reflection.assembly]::loadwithpartialname("microsoft.analysisservices")   $serveras = new-object microsoft.analysisservices.server  $serveras.connect("server")    $db = $serveras.databases["analysis db"]  $db.cubes | select name, storagemode, lastprocessed  $db.dimensions | select name, isparentchild, lastprocessed, storagemode  foreach ($c in $db.dimensions)  {$c.process("processfull")}  foreach ($c in $db.cubes)  {$c.process("processfull")} 

you need ignore key errors this:

## set error configuration key errors ignored $errorconfig = new-object `     microsoft.analysisservices.errorconfiguration("d:\processlogs\") $errorconfig.keynotfound = "reportandcontinue" $errorconfig.keyerroraction = "converttounknown" $errorconfig.keyerrorlimit = -1 

and process error config parameter:

## process current database $c.process("processfull", $errorconfig) 

reference , example: http://www.biadmin.com/2012/07/bi-admin-scripts-process-ssas-database.html


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -