After migrating to a different CRM database or changing the server name it is possible the following error will appear:
ExecuteNonQuery requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.
Check that in addition to updating all of the registry entries under HKLM\Software\Microsoft\MSCRM the SQL connection string value shown in the following query:
Select ConnectionString from Organization.