Answers.Body: <p>You could try CiviCRM Entity in combination with the EFQ Views module. The entity field query views module uses an alternative query backend. Since CiviCRM Entity uses the api to load entities, it doesn't depend on the SQL being in a particular place. Disclaimer, I haven't tried this for your particular use case, and the field and filter handlers will be rough around the edges, but it won't take long to experiment.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-14T04:00:43.123Z
Answers.LastActivityDate: 2018-02-14T04:00:43.123Z
Answers.UserDisplayName: jackrabbithanna
Answers.Body: <p>It seems, that views integration will never work, if the Drupal and CiviCRM databases are located on different hosts.</p>
  
  <p>If you encounter the same problem, and your hosting provider also were not able to move the two databases to the same host, maybe the following hack might help:
  When I create 2 new databases immediately one after the other, my hoster will most probably put them on the same host - and everything works well again. That helped for me...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-07T22:04:07.813Z
Answers.LastActivityDate: 2018-02-07T22:04:07.813Z
Answers.UserDisplayName: Detlev Sieber
Body: <p>A few weeks ago, we did a mainly successful migration of a Drupal/CiviCRM site from one hosting provicer to another one. Now, we realized, that some Drupal Views do not work anymore!</p>
  
  <p>Configuring a Drupal Views CiviCRM Integration is well described in this document:
  <a href="https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/</a></p>
  
  <p>And of course, we already put in the statements from civicrm/admin/setting/uf?reset=1</p>
  
  <p>However, our new hosting provider puts the databases on different hosts (and is not able to move them to the same host)! However, the instruction in the above link says: "These instructions assume CiviCRM and Drupal are on separate databases located on the same physical host."</p>
  
  <p>Any idea what I should put into the settings.php to get that to work?</p>
  
  <p>(a workaround might be, migrating Drupal and CiviCRM into the same database - but that is something I would like to avoid...)</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-26T18:53:49.280Z
Comments.Text: I tried to sort something like this once and it turned into a big mess. 
  I think you really have only two choices if your host will not put them both on the same machine for you: migrate to one db as you said or find another host.
Comments.UserDisplayName: ericG
Tags: <drupal><drupal-views>
Title: Drupal Views Integration with Drupal + CiviCRM databases on different hosts
ThreadText: # Drupal Views Integration with Drupal + CiviCRM databases on different hosts
  
  (Asked by: username_0 on 2018-01-26)
  
  A few weeks ago, we did a mainly successful migration of a Drupal/CiviCRM site from one hosting provicer to another one. Now, we realized, that some Drupal Views do not work anymore!
  
  Configuring a Drupal Views CiviCRM Integration is well described in this document:
  <https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/>
  
  And of course, we already put in the statements from civicrm/admin/setting/uf?reset=1
  
  However, our new hosting provider puts the databases on different hosts (and is not able to move them to the same host)! However, the instruction in the above link says: "These instructions assume CiviCRM and Drupal are on separate databases located on the same physical host."
  
  Any idea what I should put into the settings.php to get that to work?
  
  (a workaround might be, migrating Drupal and CiviCRM into the same database - but that is something I would like to avoid...)
  
  **Tags:** drupal, drupal-views
  
  > **Comments:**
  > **username_1**: I tried to sort something like this once and it turned into a big mess.  I think you really have only two choices if your host will not put them both on the same machine for you: migrate to one db as you said or find another host.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-02-14. Score: 2
  
  You could try CiviCRM Entity in combination with the EFQ Views module. The entity field query views module uses an alternative query backend. Since CiviCRM Entity uses the api to load entities, it doesn't depend on the SQL being in a particular place. Disclaimer, I haven't tried this for your particular use case, and the field and filter handlers will be rough around the edges, but it won't take long to experiment.
  
  
  ---
  
  ### Answer by username_0 on 2018-02-07. Score: 1
  
  It seems, that views integration will never work, if the Drupal and CiviCRM databases are located on different hosts.
  
  If you encounter the same problem, and your hosting provider also were not able to move the two databases to the same host, maybe the following hack might help:
  When I create 2 new databases immediately one after the other, my hoster will most probably put them on the same host - and everything works well again. That helped for me...
  
  
  ---
  
  