back up file size

  • Hi All,

    Is there any mechanism to calculate backup size depending on database size ?

    Thank You.

    Regards,
    Raghavender Chavva

  • The backup consists of the actual space used in the data and log files (not the space allocated) plus a bit of room for meta data and some more for uncommitted transactions and transactions that committed between the start and end of the backup. Basically, you can get pretty close to the size of the backup with the space used from the files. It's not going to be 100%, but it'll be close enough for most size estimates.

    "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

  • But, almost forgot this, that assumes no compression. If you're using compression, all bets are off on making that estimate.

    "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

  • I dont know, if iam right, but i do this...

    GO to database-->right click -->tasks--> shrink--> files-->

    see the avalaible free space( %)

    100 -( %) = % of the currently allocated space

    similarily for log size.

    adding both files, tht should be hte approx backup size.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • SKYBVI (2/11/2011)


    I dont know, if iam right, but i do this...

    GO to database-->right click -->tasks--> shrink--> files-->

    see the avalaible free space( %)

    100 -( %) = % of the currently allocated space

    similarily for log size.

    adding both files, tht should be hte approx backup size.

    Regards,

    Sushant

    That's kind of the hard way to go about it. If you want to use SSMS, right click on the database and select Properties and check the Size property in the first window that pops up.

    "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

  • thts difffernet from wat i said...

    I said hte approx backup size and u told abt hte total size of the db.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • SKYBVI (2/11/2011)


    thts difffernet from wat i said...

    I said hte approx backup size and u told abt hte total size of the db.

    Regards,

    Sushant

    No, if you look, that's the total space used by the database. The space used by the database is the size of the backup. Note, space used, not space allocated. If you look at the database properties there are two numbers, space used and space free. These are not differentiated between logs and data, it's just the size. Combine these two for the allocated space of the database, but the space used is just that, the data & logs that are currently written to disk. That's what gets backed up, plus some meta-data.

    "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

  • but the size of backup cant be determined by the so called allocated space for the db.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • Right. Allocated space is not the same as used space. Allocated space has nothing to do with backup size. Used space does.

    "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

  • Thanks All for your valuable suggestions, it was nice discussion.

    If possible can you please provide the SQL Server interview questions ?

    Thank You.

    Regards,
    Raghavender Chavva

  • Raghavender (2/12/2011)


    Thanks All for your valuable suggestions, it was nice discussion.

    If possible can you please provide the SQL Server interview questions ?

    Nope. That's not how most of us work around here. We're here to help you learn, not to feed you interview answers so you can fake your way into a job.

    "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

  • lol....:)

    Regards
    Sushant Kumar
    MCTS,MCP

  • GUYS FYI: I am not a fake guy, jst asked if I get any help from you guys or not.

    if you think this will encourage the fake guys, np, I will read out myself.

    If I get any doubts, will disturb the community with my questions.

    Any Way thank you for your suggestions. 🙂

    Thank You.

    Regards,
    Raghavender Chavva

  • I dont understand why people ask interview questions here,

    when they know that they can get many links on google.

    Also, if somebody replies to interview questions, their links would also come thru google search only.

    I was surprised how the topic changed from backup file size to sql server interview questions..or tht question was just made up for asking interview questions at a later stage.....Just wondering.

    Regards
    Sushant Kumar
    MCTS,MCP

  • Raghavender (2/14/2011)


    GUYS FYI: I am not a fake guy, jst asked if I get any help from you guys or not.

    if you think this will encourage the fake guys, np, I will read out myself.

    If I get any doubts, will disturb the community with my questions.

    Any Way thank you for your suggestions. 🙂

    No please, stick around. Ask technical questions. The people who post here are happy to help. But when you straight out asked for interview answers, you crossed the line for many of us. No big deal. Just don't ask those types of questions.

    "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

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic. Login to reply