Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Enterprise
Expertise: Intermediate
Jan 10, 2002

Check Which Files are Included in a Backup Device


In SQL Server, if you just want to check which data- and logfiles are included in a database backup device, you can use 'RESTORE FILELISTONLY FROM xyz' (with xyz representing the actual device) for this. For example, on my machine, the following command gives the result specified below:
 
RESTORE FILELISTONLY FROM DISK = 'D:\MSSQL\Backup\MyDB.bak'

<table>
<tr>
<td><b>LogicalName</b></td>
<td><b>PhysicalName</b></td>
<td><b>Type</b></td>
<td><b>FileGroupName</b></td>
<td><b>Size</b></td>
<td><b>MaxSize</b></td>
</tr>
<tr>
<td>MyDB_Data</td>
<td>D:\MSSQL\Data\MyDB_Data.MDF</td>
<td>D</td>
<td>PRIMARY</td>
<td>6881280</td>
<td>35184372080640</td>
</tr>
<tr>
<td>MyDB_Log</td>
<td>D:\MSSQL\Data\MyDB_Log.LDF</td>
<td>L</td>
<td>NULL</td>
<td>2883584</td>
<td>35184372080640</td>
<tr>
</table>
Christoffer Hedgate
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date