Restoring Database - Not enough space (when there IS enough space)

  • Hi All,

    Would you know if it is normal that when you restore DB , SQL would need full DB space to be free for the LOG folder.

    DBSIZE :- 16GB

    LOGSIZE :- 2GB

    DB FOLDER :- D:\bla bla bla

    LOG FOLDER :- E:\bla bla bla

    Free Space on D :- 42GB

    Free Space on E :- 13GB

    When I try to restore I get an error saying :

    There is insufficient free space on disk volume 'E:\' to create the database. The database requires 16776429568 additional free bytes, while only 14348013568 bytes are available. [SQLSTATE 42000] (Error 3257) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.

    Command Used:

    RESTORE DATABASE [i]DBNAME[/i]

    FROM DISK = N'D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\DBNAME.BAK'

    WITH FILE = 1,

    NOUNLOAD ,

    STATS = 10,

    RECOVERY ,

    REPLACE ,

    MOVE N'DBNAME_Data' TO N'D:\Program Files\Microsoft SQL Server\MSSQL\Data\DBNAME_Data.MDF',

    MOVE N'DBNAME_Log' TO N'E:\SQLLogs\DBNAME.LDF'

    If it's not normal, am I doing something wrong? is there a weay around this?

    Thanks a Lot

    Mark

  • Hi Mark,

    can you provide the output of this ?

    RESTORE FILELISTONLY FROM DISK = 'D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\DBNAME.BAK'

    thanks,

    Alejandro

    Alejandro Pelc

  • DBNAME_Log F:\SQLlogs\DBNAME_Log.LDF L NULL 16776429568 35184372080640

    That's it, the Log file is really 16GB and I just noticed that part of the job that I have to restore the Test DB has a dbcc shrinkfile for the log thus then shrinks it to 2GB (the size of the log file without the free space)

    Shite, I should have known that because I read most of the backups Forum. but stupid me decided that I don't need to check the FILELIST as I "knew" the file sizes.

    Thanks again for your help

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

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