If you are running Sitecore 9.0 update 2 and got EXM disabled you may encounter the following error:
This is actually a known bug in Sitecore 9.0.2.
To fix it you can run the following SQL script on the ReferenceData table after you stop both xConnect services:
The first part is only to test that the ID’s are correct. You should get 10 results. The last part deletes the EXM definitions.
Remeber to set workflow state to “Workflows/Experience Analytics Segment/Inactive” on the items under “/sitecore/system/Marketing Control Panel/Experience Analytics/Dimensions/ExM/[ParentItem]” to avvoid the definitions to come back in the database.