dbatools is a free PowerShell module with over 200 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Test-DbaMigrationConstraint

This command shows if you can migrate one or more database(s) between instances.

Which versions and editions are supported by this function?

This function only validate SQL Server 2008 versions or higher.
The editions supported by this function are:

  • Enterprise
  • Developer
  • Evaluation
  • Standard
  • Express

 

How it is validated?

The validation will be made using the ‘sys.dm_db_persisted_sku_features‘ dynamic management view to list all edition-specific features that are enabled in the current database.

But, since last November 2016, we have SQL Server 2016 SP1…

and this version brought great news!
Now, almost every edition can run every single feature. This means, for example, that you can use ‘Compression’ feature on Express edition!

“Almost” because there are very few ones that are not supported on lower editions (Express and LocalDB).
You can find more information at Microsoft SQL Server 2016 Service Pack 1 (SP1) released !!! blog post.

The good news is this command is SQL Server 2016 SP1 aware!

Screenshots

Verify if databases can be migrated from sql2012 (Enterprise) to sql2016 (RTM Standard Edition) instance.

 

 

 

 

 

Verify if databases can be migrated from sql2012 (Enterprise) to sql2016 SP1 Express Edition instance.

 

Verify if database DBWithCDC can be migrated from sql2016 SP1 Standard to sql2016 SP1 Express Edition.

 

 

 

 

 

Verify if databases can be migrated from sql2016 SP1 Standard to sql2016 RTM Standard Edition.

 

 

 

Examples

Verify all databases for features in use that can’t be used on the destination instance using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster.

 

Verify only database ‘DBWithCompression’ for features in use that can’t be supported on the destination instance

Author

This command was created by Cláudio Silva. You can find Cláudio on Twitter and LinkedIn.

Get-Help

From PowerShell, execute Get-Help Test-DbaMigrationConstraint -Detailed for more information on this function.

Source Code

Want to see the source code? View Test-DbaMigrationConstraint.ps1 on GitHub
 

Related commands