Microsoft KB Archive/312399

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

Article ID: 312399

Article Last Modified on 3/29/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Analysis Services
 * Microsoft SQL Server 2000 Analysis Services
 * Microsoft SQL Server 2000 Analysis Services

-



This article was previously published under Q312399



IN THIS TASK
SUMMARY How to Archive the Database
 * Archive Syntax
 * Archive Example

How to Restore the Database
 * Restore Syntax
 * Restore Example

REFERENCES



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.

back to the top

How to Archive the Database

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


 * 1) Click OK
 * 2) At the command prompt, type: cd %systemroot%\Program Files\Microsoft Analysis Services\Bin

By default, the msmdarch file is in that location.


 * 1) 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.

back to the top

Archive Syntax
Here is an archive syntax example. A description of each parameter follows. [&quot;command-path]msmdarch[&quot;] /a Server &quot;OLAPDataPath&quot; &quot;DatabaseName&quot; &quot;BackupFileName&quot; [&quot;LogFileName&quot; [&quot;TempDirectory&quot;]]

back to the top

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

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.

back to the top

How to Restore the Database

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


 * 1) Click OK.
 * 2) At the command prompt, type: cd %systemroot%\Program Files\Microsoft Analysis Services\Bin

By default, the msmdarch file is at that location.


 * 1) At the command prompt, type: msmdarch /rs


 * 1) 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.

back to the top

Restore Syntax
Here is a restore syntax example. A description of each parameter follows. [&quot;command-path]msmdarch[&quot;] switch Server &quot;OLAPDataPath&quot; &quot;BackupFileName&quot; [&quot;LogFileName&quot; [&quot;TempDirectory&quot;]]

back to the top

Restore Example
The following command restores the sample FoodMart 2000 database included in Analysis Services.

&quot;\Program Files\Microsoft Analysis Services\Bin\msmdarch&quot; /r myserver &quot;\Program Files\Microsoft Analysis Services\Data\&quot; &quot;\My archives\server myserver\FoodMart 2000.cab&quot; 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.

back to the top

