Database Reference
In-Depth Information
# set id, name and query definition properties
for the new partition:
$new_partition.id = "Reseller Sales 2008"
$new_partition.name = "Reseller Sales 2008"
$new_partition.Source.QueryDefinition = "SELECT
* FROM FactResellerSales WHERE DueDateKey
BETWEEN 20080101 AND 20081231"
# store new partition's identifier in a
variable for the next step:
$partition_id =
$amoServer.Databases[$db].Cubes[$cube].MeasureGroups[0].partitions.Add($new_partition)
# send the new partition definition to the
server:
$amoServer.Databases[$db].cubes[$cube].MeasureGroups[0].Partitions[$partition_id].Update()
$amoServer.databases[$db].update()
#disconnect from the server
$amoServer.disconnect()
Once you run the script and refresh the partition list in SSMS, you will see the newly
created "Reseller Sales 2008" partition. You can examine its properties by scripting
it into a new query window to confirm that the ID, name, and query definition are set
correctly.
Partition storage mode options
Each partition can use one of the three storage options summarized in the following
table:
Search WWH ::




Custom Search