Question: how to enable xdb in sitecore?
Answer: Create a patch file for the \\path\to\web\root\App_Config\Sitecore\Marketing. xDB\Sitecore. ... 
To disable data collection, set the Xdb. Enabled setting to false .
Open the web. ... 
Optionally to disable tracking, set the Xdb.