![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Devin, DSO is the object model for Analysis Services analogous to DMO for SQL Server. Take a look at Books Online for more information. You are in particular looking at the Clone method on the Cube object (MDStore interface). The (pseudo) code would look something like this in VB. Not sure if it will compile but it should be mostly right: Dim s as new DSO.Server s.connect "myservername" Dim SourceCube as DSO.MDStore set SourceCube = s.MDStores("my database name").MDStores("my cube name") Dim TargetServer as new DSO.Server 'only if you want to copy to another server TargetServer.Connect "server name" Dim TargetDatabase as DSO.MDStore Set TargetDatabase = TargetServer.MDStores("target database name") ' or Set TargetDatabase = s.MDStores("my database name") if you are making copy of the cube in the same database Dim TargetCube as DSO.MDStore Set TargetCube = TargetDatabase.MDStores.AddNew("new cube name") SourceCube.Clone(targetCube, cloneMajorChildren) ' this will copy all partitions as well ' or SourceCube.Clone(targetCube, cloneMinorChildren) ' this will copy no partitions (maybe just the default - 1st - one) TargetCube.Update TargetCube.Process You will have to process the cube after cloning because DSO will just copy the metadata Marin Bezic -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm. "Devin McMahon" <dmcmaho1 (AT) twcny (DOT) rr.com> wrote in message news:10ef789a.0307071041.2879172f (AT) posting (DOT) google.com... I have what I believe is a unique situation. I am using SQL Server Analysis Server to build a cube of "snapshot" month-end type of data. This data is from an instance of Microsoft Navision and I have successfully used SQL-DMO and DTSPackage Library objects to allow the user to rebuild the cube through Navision. This is accounting data and as such, the accountants want to be able to archive this data by month. I know through Analysis Server Manager interface I can copy the cube and save it to a different name. I would like to know if there is a way to programmatically save a cube to a different name with some type of automation object? Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |