Sql-server – SQL Server 2016 Express restore size limit

restoresql serversql-server-2016

SQL Server 2016 Express indicates that it will accept a database of 10GB. I try to do a restore with overwrite of existing blank database with a 8.037GB .bak file and get the message that the file is too big to restore. Any suggestions?

Best Answer

SQL Server leaves out empty space when it backs up a database. If you want to know the size of the actual data and log files inside the backup file, you need to view the header of the file.

From inside Management Studio, run the following query (you should fill in the correct value to the path of the backup file):

RESTORE FILELISTONLY FROM DISK = 'C:\path\to\backup.bak';

The results will show one or more data files, and one transaction log file.

Add up the values in the Size column to find out exactly how big the database is. The total cannot exceed 10GB.