Databases Reference
In-Depth Information
and their sizes. With this information, you can be sure that each partition will be restored
to its correct location.
Because the Restore command requires a valid password to access a backup file, a
DISCOVER_LOCATIONS request will not yield the content of the backup file without a valid
password. Be sure that you have the correct password before you begin a
DISCOVER_LOCATIONS request.
We recommend that you use the Restore Database dialog box in SQL Server Management
Studio to make these adjustments. You can, however, write your own DDL command.
When you click Partitions in the tree in the left pane of the Restore Database dialog box
in SQL Management Studio, a DISCOVER_LOCATIONS request is automatically issued against
the backup file you specified. You'll then see a list of all the partitions inside the file so
that you can choose locations.
NOTE
Partitions located in the current folder must be in the same folder after the database is
restored. You can change the location of the folder, however. This restriction also
applies to all the partitions located in the Data folder. If the partition is in the Data
folder before the restore operation, it must be in the Data folder afterward.
All this means that your restore operation requires a little preparation. If you plan to have
partitions reside on a different drive after the restore operation, it's best to create those
partitions in their own folders in the first place, even if they're in the neighborhood of the
Data folder (see Listing 39.6). Planning ahead gives you some room to play with different
locations later.
LISTING 39.6
A Restore DDL Command for Remapping Partition Locations
<Restore xmlns=”http://schemas.microsoft.com/analysisservices/2003/engine”>
<File>C:\Program Files\Microsoft SQL Server\MSSQL.1\OLAP\Backup\FoodMart
2008.abf</File>
<Locations>
<Location>
<Folders>
<Folder>
<Original>C:\tmp\data</Original>
<New>C:\tmp\data1</New>
</Folder>
</Folders>
</Location>
</Restore>
 
Search WWH ::




Custom Search