HOW TO: Archive and Restore an Analysis Services Database from the Command Prompt in SQL Server 2000 Analysis Services

Article translations Article translations
Article ID: 312399 - View products that this article applies to.
This article was previously published under Q312399
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

SUMMARY

This article describes the use of the msmdarch command to archive and restore an Analysis Services database from the command prompt. A member of the administrators group performs all the procedures for a pre-existing database.

How to Archive the Database

  1. Click Start, and then click Run.
  2. In the Open text box, type: cmd

  3. Click OK
  4. At the command prompt, type: cd %systemroot%\Program Files\Microsoft Analysis Services\Bin

    By default, the msmdarch file is in that location.

  5. At the command prompt, type: msmdarch /a

    Press Enter. The full syntax and an example are shown later in this topic.NOTE: You can use the /? Switch to display a help window that shows the syntax of the switches.

Archive Syntax

Here is an archive syntax example. A description of each parameter follows.
["command-path]msmdarch["] /a Server "OLAPDataPath" "DatabaseName" "BackupFileName" ["LogFileName" ["TempDirectory"]]
				
Collapse this tableExpand this table
ParameterDescription
command-pathThe path that contains the Msmdarch.exe file. By default, the path is C:\Program Files\Microsoft Analysis Services\Bin.
ServerThe server computer name that contains the database you want to archive.
OLAPDataPathThe path of the Data directory that contains the files for the database you want to archive. By default, the path is C:\Program Files\Microsoft Analysis Services\Data.
DatabaseNameThe name of the database you want to archive.
BackupFileNameThe path, file name, and .cab extension of the archive file.
LogFileNameThe path, file name, and .log extension of the archive log. If you specify an archive log that already exists, the new archive log is appended to it. If you specify an invalid path or file name, the archive log is written to the DBArchive.log file, which by default is C:\Program Files\Microsoft Analysis Services\Bin\DBArchive.log.
TempDirectoryThe specified path of the temporary directory used for processing space. You must specify this option if you specify LogFileName.


Archive Example


The following command archives the sample FoodMart 2000 database included in Analysis Services.
"\Program Files\Microsoft Analysis Services\Bin\msmdarch" /a myserver 
"\Program Files\Microsoft Analysis Services\Data\" "FoodMart 2000" 
"\My archives\server myserver\FoodMart 2000.cab"
				

Note: You can also execute the msmdarch command from a .bat file. If you want to schedule execution of a .bat file, you can use Data Transformation Services (DTS) to create an Execute Process task that runs the batch file. If the msmdarch command fails, it returns an exit code of 1.

How to Restore the Database

  1. Click Start, and then click Run.
  2. In the Open text box, type: cmd

  3. Click OK.
  4. At the command prompt, type: cd %systemroot%\Program Files\Microsoft Analysis Services\Bin

    By default, the msmdarch file is at that location.

  5. At the command prompt, type: msmdarch /rs

  6. Press Enter. The full syntax and an example are shown later in this topic.

    NOTE: You can use the /? switch to display a help window that shows the syntax of the switches.

Restore Syntax

Here is a restore syntax example. A description of each parameter follows.
["command-path]msmdarch["] switch Server "OLAPDataPath" "BackupFileName" ["LogFileName" ["TempDirectory"]]
				
Collapse this tableExpand this table
ParameterDescription
command-path(Optional.) The path that contains the Msmdarch.exe file. By default, the path is C:\Program Files\Microsoft Analysis Services\Bin.
switchSpecifies the option to use when you execute the command. You use the /r switch to specify a regular restoration, which overwrites the database if it exists. You use the /rs switch to restore the database from the archive file only if the database does not already exist.
ServerThe server computer name to which you want to restore the database.
OLAPDataPathThe path of the data directory that contains the files for the database after the restoration completes. By default, the path is C:\Program Files\Microsoft Analysis Services\Data.
BackupFileNameThe path, file name, and .cab extension of the archive file.
LogFileNameThe path, file name, and .log extension of the restore log. If you specify a restore log that already exists, the new restore log is appended to it. If you specify an invalid path or file name, the restore log is written to the DBRestore.log file, which by default is C:\Program Files\Microsoft Analysis Services\Bin\DBRestore.log.
TempDirectoryThe specified path of the temporary directory used for processing space. You must specify this option if you specify LogFileName.


Restore Example


The following command restores the sample FoodMart 2000 database included in Analysis Services.
"\Program Files\Microsoft Analysis Services\Bin\msmdarch" /r myserver 
"\Program Files\Microsoft Analysis Services\Data\" 
"\My archives\server myserver\FoodMart 2000.cab"
				
NOTE: You can also execute the msmdarch command from a .bat file. If you want to schedule execution of a .bat file, Microsoft recommends that you use Data Transformation Services (DTS) to create an Execute Process task that runs the batch file. The msmdarch command returns an exit code of 1 if it fails.




REFERENCES

DTS Overview





Properties

Article ID: 312399 - Last Review: February 28, 2014 - Revision: 3.3
APPLIES TO
  • Microsoft SQL Server 2000 Analysis Services
Keywords: 
kbnosurvey kbarchive kbhowtomaster KB312399

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com