By default when we install ADFS, it used wid as database source. Sometimes we need to migrate WID to SQL due a number of reasons. This guide can help you to migrate ADFS Configuration database from WID to SQL.
Please note that this guide is for Windows 2012 R2 ADFS.
If you want to use it ffor ADFS windows 2016 then you need to change database from ADFSConfiguration.mdf to ADFSConfigurationV3.mdf.
This is because windows 2016 ADFS use version 3 database so modify ADFSConfiguration.mdf to ADFSConfigurationV3.mdf in guide.