How should I configure multiple Drupal sites to share a CiviCRM database?
You should read about Drupal multi-site feature. That's we can use the same database and same modules if the D2 is working as an parked domain for D1 website.

I would like to share the reference link https://www.drupal.org/documentation/install/multi-site 

Please check that one.