Sql-server – Database Size error to restore to SQL Server express 2014

sql serversql server 2014sql-server-2008sql-server-2008-r2

I have a SQL Server 2008 R2 database, about 7 GB
I make a backup from SQL Server2008R2 and tried to restore it to SQL Server2014 Express getting an error:

CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 10240 MB per database

what steps should i follow to avoid that problem?

Best Answer

The backup is 7GB? What are the sizes of the MDF files before the backup? That is what Express Edition checks - it doesn't care about the size of the backup file, it cares about how big the data files are that it has to put on the disk.

If this is for a production instance of SQL Server 2014 Express Edition, you're going to have to go back to the source and shrink those data files - it might be that they are larger than 10GB but not full, or it might be that you'll need to actually clear out some of the data.

If this is for local development, I suggest using SQL Server 2016 Developer Edition, which is free - and doesn't have any silly limits on file size.