November 26, 2007 at 5:19 am
Hi All,
i am not able to find the backup file size without actually backuping up database. if you have some query to find this please added in this post
if any other alternative for doing this feel free while posting
Regards
Shashi kant chauhan
November 26, 2007 at 1:13 pm
If you're doing a native backup, you should be able to get a pretty close metric by seeing how much space is used in the database. This is assuming you don't have a lot of data files or use full-text indexes. At any rate, a full backup should contain only data pages that have data in them. I would probably do the quick and dirty way by right-clicking on the database and looking at the file size, unless it has to be for all DBs or for more than one. I'll leave it someone else to do such a summation query.
Thanks,
Eric
November 26, 2007 at 1:25 pm
The size of the backup is about equal to the amount of space used in the database. The link below will give you the size of all databases on a server.
Get Server Database File Information
November 26, 2007 at 1:40 pm
Hi,
with the following script you will have the last 20 backups.
Select
Top 20 Convert(Varchar(40), S.database_name) AS [Database Name]
,Convert(varchar(19),S.backup_start_date, 120) AS [Start Date]
,Convert(varchar(19), S.backup_finish_date, 120) AS [Finish Date]
,Datediff(s, S.backup_start_date, S.backup_finish_date) AS [Duration (s)]
,Case
type
When 'D' Then 'FULL'
When 'L' Then 'Log'
When 'I' Then 'Differential'
When 'F' Then 'File Group' End As Type
,Convert(Varchar(15), Convert(Decimal(5, 2), Round(S.backup_size / Square(1024), 2))) AS [Size (MB)], Convert(varchar(19),
S.expiration_date, 80) AS [Expiration Date],
M.physical_device_name AS [Phys. Device Name],
M.logical_device_name As [Logi. Device Name]
From
msdb.dbo.backupset S Inner Join
msdb.dbo.backupmediafamily M ON S.media_set_id =M.media_set_id
Order By
S.backup_finish_date Desc
Regards,
Ahmed
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply