Restore database is failing..

  • Hi Experts,

    We are trying to restore a prod database on one of the sub-prod environments. We are doing the restore via sql agent job.

    Job is failing and when I see the job history, it shows below message.

    There is insufficient free space on disk volume 'E:\' to create the database.

    The database requires 636590489600 additional free bytes, while only 206158872576 bytes are available.

    [SQLSTATE 42000] (Error 3257) Problems were identified while planning for the RESTORE statement.

    My Question is why does the RESTORE is failing? We are even using WITH REPLACE option which tries to replace existing files and there is around 190 GB free space in drive.

    What makes SQL Server tell the user that it needs additional of 636590489600 bytes (593 GB). Can anyone please explain?

    Environment details

    ============================

    select @@version

    Microsoft SQL Server 2012 (SP4) (KB4018073) - 11.0.7001.0 (X64)

    Aug 15 2017 10:23:29

    Copyright (c) Microsoft Corporation

    Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

    --drive info

    Currently E: drive allocate space = 4.62 TB , 191 GB Free.

    -- Tried to do restore filelistonly

    RESTORE filelistonly

    FROM DISK='H:\Backup\db_name_Full_20190813_230453.BAK'

    Capture

     

    -- checked the current file size

    select * from master..sysaltfiles

    where dbid = db_id('dbname')

    2

    Thanks,

    Sam

  • Current size on E: drive is shown as 2.02 TB, size to restore on E: is 2.66 TB. Thus you need 0.64 TB of free space on E: (in addition to space currently used), but you only have 0.2 TB free. This is exactly what the error message is telling you.


    Have Fun!
    Ronzo

  • Thanks for the explanation.

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

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