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
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
- Click Start, and then click Run.
- In the Open text box, type: cmd
- Click OK
- At the command prompt, type: cd %systemroot%\Program Files\Microsoft Analysis Services\Bin
By default, the msmdarch file is in that location.
- 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"]]
Parameter | Description |
---|---|
command-path | The path that contains the Msmdarch.exe file. By default, the path is C:\Program Files\Microsoft Analysis Services\Bin. |
Server | The server computer name that contains the database you want to archive. |
OLAPDataPath | The 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. |
DatabaseName | The name of the database you want to archive. |
BackupFileName | The path, file name, and .cab extension of the archive file. |
LogFileName | The 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. |
TempDirectory | The 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.
back to the top
How to Restore the Database
- Click Start, and then click Run.
- In the Open text box, type: cmd
- Click OK.
- At the command prompt, type: cd %systemroot%\Program Files\Microsoft Analysis Services\Bin
By default, the msmdarch file is at that location.
- At the command prompt, type: msmdarch /rs
- 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"]]
Parameter | Description |
---|---|
command-path | (Optional.) The path that contains the Msmdarch.exe file. By default, the path is C:\Program Files\Microsoft Analysis Services\Bin. |
switch | Specifies 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. |
Server | The server computer name to which you want to restore the database. |
OLAPDataPath | The 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. |
BackupFileName | The path, file name, and .cab extension of the archive file. |
LogFileName | The 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. |
TempDirectory | The 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.
back to the top
Additional query words: OLAP
Keywords: kbhowtomaster KB312399