Archiving Database

  • I am using msmdarch.exe to archive my database and I'm curious as to why the file size is so much smaller than if I were to rcreate the archive file from going into Analysis manager and clicking "archive database".  I assume I'm just copying over the structure of the database and no data.  Any help would be appreciated.

     

    here is my command

    "C:\Program Files\Microsoft Analysis Services\Bin\MSMDARCH.EXE" /A myServer "C:\Program Files\Microsoft Analysis Services\Data" "myOLAPDatabase" "\\Server\D$\myOLAPDatabaseBackup.CAB"

     

    Thanks,

     

    Trevor

  • The msmdarch.exe really just makes calls to the same COm objects that the MMC (Analysis Manager) does, so it shouildn't produce a file that's smaller. When archiving (as far as I know) you can't specify to just get the structure, you always get structure and data.

    How/what are you using in comparison to determine the cab file size is different( ie are you looking at cab1 built from within MMC and cab2 built using msmdarch)?

    Steve.

  • Ya I didn't think there should be a difference.  Yes I am comparing the cab1(~300kb) build within MMC to cab2(~7kb) built using msmdarch.  I guess one way to test it out would be to try restoring to database using the cab file created.

     

    Here is what gets recorded in the log file.

     

    Archive log. SQL Server 2000 Analysis Services.

    Thursday, March 23, 2006 10:03:45 AM

    Last archived: 3/23/2006 9:33:02 AM

    3/23/2006 10:03:45 AM Saving repository.

    3/23/2006 10:03:45 AM Creating .cab File: \\myServer\D$\myCube.CAB

    3/23/2006 10:03:45 AM File: OLAPDB.REP (58KB)

    3/23/2006 10:03:45 AM Archive successful.

  • I noticed that when you manually archive a database it uses the path

    "C:\Program Files\Microsoft Analysis Services\Data\myCubeFolder"

    This folder contains a whole bunch of files and is obviously the reason for the difference in file size.

     

    One of the parameters in msmdarc.exe is the olapDataPath which is:

    C:\Program Files\Microsoft Analysis Services\Data

     

    When I change the path in my script to be

    "C:\Program Files\Microsoft Analysis Services\Data\myCubeFolder" and it doesn't create the backup file.

     

    I am concerned that I'm not backing up necessay information.  Can anyone clarify this please!

     

    Thanks,

     

    Trevor

     

  • Hi Trevor,

    I'm still not sure how you're getting the different file size. I just did a quick test on my foodmart and they come out identical.

    When doing the command line call where you pass the data path, you need only pass the path to the actual data directory (i.e. the root for all data folders) for Analysis Services, so I *wouldn't* put the catalog name in there. Msmdarch will know where to look based on the catalog name you pass to it.

    The following cmdline call prodcued exactly the same file size as using the MMC approach.

    msmdarch /A "C:\_data\SQL Server 2000 Data Files\AS_Data" "Foodmart 2000" "c:\temp\myFoodmart.cab" "c:\temp\myfm.log"

    Have you opened the cab files to see the differences internally? If you do this with winzip and then sort by the folder name you can see the approach that the archiving process takes - basically produce two xml documents (olapdb.inf and olapdb.rep) that detail the other (data, dimension etc) contents of the cab. The *.rep file (one has to assume) is what is used to populate/update the repository when restoring the archive.

    Steve.

  • note in the cmdline call, I had put my machine as < my_machine > which was removed when posting. servername is obviously the first parm after the /A.

    Steve.

  • Thanks for all the replys, I did a resotore from the cab file and everything works great so I'm feeling better about the whole process.  I am going to keep investigating the difference in file size but like I said in my other post when you manually archive a database the data path is different then the one you specify in the cmd line.

     

    Thanks

     

    Trevor

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply