Databases Reference
In-Depth Information
Using a DDL Command to Back Up Your Database
If you prefer, you can work directly with the DDL command instead of using the Backup
Database interface to back up your database. The easiest way to explain this is to use the
Script function of the dialog box.
NOTE
You could also use any text editor to write your own command. If you save it with the
extension .xmla , you can use SQL Server Management Studio to send your command
directly to Analysis Server.
Along the top of the right pane in the Backup Database dialog box, you'll find a series of
buttons. Click the button labeled Script. If you move to SQL Server Management Studio,
you'll see a command script that reflects the options that you selected in the dialog box.
If you right-clicked the FoodMart 2008 database and made no changes in the Backup
Database dialog box options, you would see the command in Listing 39.1.
LISTING 39.1
A Simple DDL Command for Backing Up FoodMart 2008
<Backup xmlns=”http://schemas.microsoft.com/analysisservices/2003/engine”>
<Object>
<DatabaseID>FoodMart 2008</DatabaseID>
</Object>
<File>FoodMart 2008.abf</File>
</Backup>
Default options are not present in the scripted command. Because you selected the default
for each option in the dialog box, the command contains just these few lines identifying
the database to be backed up and the name of the backup file. If you had made other
choices in the dialog box, the scripted command would be somewhat longer.
To issue this command, just click the Execute button. If you look in the folder C:\Program
Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP \Backup , you'll see that the
FoodMart 2008.abf file has been created.
The designers of Analysis Server built in both simplicity (as shown in the preceding
example) and power to execute backups for the most complex configurations. The power
is provided by the options that you can add to the DDL command. The complete set of
options for the Backup command appears in Listing 39.2, with the default values in bold.
LISTING 39.2
Complete Set of Options for the DDL Backup Command
<Backup>
<object>object_ref</object>
 
Search WWH ::




Custom Search