November 2, 2010 at 3:50 am
[font="Times New Roman"]
Hi All,
Is there any way to predict the full backup size of a database before actuly taking its backup ?
Any help will be appreciated 🙂
Regards,
Sujeet
[/font]
November 2, 2010 at 4:32 am
It should be close to used space in the data file plus little more (some portion from active log file).
November 2, 2010 at 6:10 am
Yep, what he said. Generally the size of the data stored will define, in pretty close approximation, the size of the database. You can get the size a number of ways. sp_spaceused is one way. There are tons of others, SMO, PowerShell, for example, check this link.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
November 2, 2010 at 6:26 am
Grant Fritchey (11/2/2010)
Yep, what he said. Generally the size of the data stored will define, in pretty close approximation, the size of the database. You can get the size a number of ways. sp_spaceused is one way. There are tons of others, SMO, PowerShell, for example, check this link.
It's actually dead on for me, within 1.4% of the actual backup size using native sql backup without compression.
November 2, 2010 at 6:48 am
Ninja's_RGR'us (11/2/2010)
Grant Fritchey (11/2/2010)
Yep, what he said. Generally the size of the data stored will define, in pretty close approximation, the size of the database. You can get the size a number of ways. sp_spaceused is one way. There are tons of others, SMO, PowerShell, for example, check this link.It's actually dead on for me, within 1.4% of the actual backup size using native sql backup without compression.
That sounds like what I would expect. Any significant variation means something is up. It's just not going to be 1:1.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
November 2, 2010 at 1:25 pm
@ sujeet
Run this query against your database and see the results. The UsedSpaceMB will give you an idea as how much will be the .bak file too (they should be almost similiar):--
select [FileSizeMB] = convert(numeric(10,2)
, round(a.size/128.,2))
, [UsedSpaceMB] = convert(numeric(10,2)
, round(fileproperty( a.name,'SpaceUsed')/128.,2))
, [UnusedSpaceMB] = convert(numeric(10,2)
, round((a.size-fileproperty( a.name,'SpaceUsed'))/128.,2))
, [DBFileName] = a.name
from sysfiles a
Regards,
Sushant
Regards
Sushant Kumar
MCTS,MCP
November 2, 2010 at 11:39 pm
[font="Times New Roman"] Hi All,
Thanks a lot for your replies. They are really helpful. Appreciate it 🙂
Regards,
Sujeet
[/font]
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply