How to find the database size from a full backup?

  • Is it possible to get the database size from a full backup?

    Regards,

    SueTons.

    Regards,
    SQLisAwe5oMe.

  • one of the more obscure RESTOre commands can help you:

    this command will present a row of data showing you the size and maxsize of the database, which is almost certainly smaller than the actual backup size.

    in this example database, the backup is 1.1 gig gig in size, and the database itself is 2.1 gig, when restored.

    RESTORE FILELISTONLY

    FROM DISK = N'F:\SQLData\DEV223\Backup\SandBox.bak'

    /*

    LogicalName PhysicalName Type FileGroupName Size MaxSize FileId CreateLSN DropLSN UniqueId ReadOnlyLSN ReadWriteLSN BackupSizeInBytes SourceBlockSize FileGroupId LogGroupGUID DifferentialBaseLSN DifferentialBaseGUID IsReadOnly IsPresent TDEThumbprint

    -------------- -------------------------------------------------------------------------------------- ---- -------------- -------------------- -------------------- -------------------- ---------- --------- ------------------------------------ --------------------------------------- --------------------------------------- -------------------- --------------- ----------- ------------------------------------ --------------------------------------- ------------------------------------ ---------- --------- ------------------------------------------

    SandBox C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\SandBox.mdf D PRIMARY 2268332032 35184372080640 1 0 0 C9D28B46-67EF-4163-87E2-2A2494C67379 0 0 1191378944 512 1 NULL 2124000000030200037 20F25702-CB13-4337-AC4E-2079CDA07308 0 1 NULL

    SandBox_log C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\SandBox_log.LDF L NULL 516096 2199023255552 2 0 0 6864460E-85A5-4AF0-878A-BE3D3F395E59 0 0 0 512 0 NULL 0 00000000-0000-0000-0000-000000000000 0 1 NULL

    */

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Lowell.

    SueTons.

    Regards,
    SQLisAwe5oMe.

Viewing 3 posts - 1 through 2 (of 2 total)

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