This question has probably been asked a dozen times but I couldn't find them here or at SO.
Can I attach/restore a SQL Server 2008 R2 database to my local SQL 2008 R2 Express instance?
migrationrestoresql serversql-server-2008-r2
This question has probably been asked a dozen times but I couldn't find them here or at SO.
Can I attach/restore a SQL Server 2008 R2 database to my local SQL 2008 R2 Express instance?
Best Answer
Not if you used any persisted Enterprise features. If you used any of such there will be an entry in
sys.dm_db_persisted_sku_features
and when trying to open/attach/restore this database on any edition lower than Enterprise you will gen an exception and the database won't open. The list possible of persisted SKU features are:In addition, for Express edition specifically, the database must be smaller than the maximum database size supported by Express Editions (10Gb). There could be complications if you used any of the service pack specific options like
sp_db_increased_partitions
but I doubt that's the case.If your database is clean of all of the above then Express will open it w/o problems. If the source is a Standard Edition then for sure it won't have any of the persisted Enterprise features and the only issue is size.
You need to make sure the SQL Server is the same major release (SQL Server 2008R2, not SQL Server 2008). The patching level (service pack and cumulative updates applied) does not matter as the database format cannot change between minor releases, but it would be recommended to have the Express patched to the latest SP and have the latest CU applied.