# Direct connection to database

**URL:** <https://forum.dimagi.com/t/direct-connection-to-database/2464>\
**Category:** Users\
**Created:** [November 2, 2015, 4:49pm UTC](https://forum.dimagi.com/t/direct-connection-to-database/2464 "2015-11-02T16:49:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Annegreet\_Ottow-Boek](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@Annegreet\_Ottow-Boek](https://forum.dimagi.com/u/Annegreet_Ottow-Boek)\
**Post date:** [November 2, 2015, 4:49pm UTC](https://forum.dimagi.com/t/direct-connection-to-database/2464/1 "2015-11-02T16:49:49Z")

</div>

Is it possible to connect to the commcare database with our data directly,  
without API? So we could send SQL queries directly?

---

<div class="post-metadata">

**Author:** ![czue](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/czue/32/493_2.png) [@czue](https://forum.dimagi.com/u/czue)\
**Post date:** [November 3, 2015, 7:03am UTC](https://forum.dimagi.com/t/direct-connection-to-database/2464/2 "2015-11-03T07:03:18Z")

</div>

Hey,

No, for security reasons this is not possible. We recommend using the data  
export tool  
[https://confluence.dimagi.com/display/commcarepublic/CommCare+Data+Export+Tool](https://confluence.dimagi.com/display/commcarepublic/CommCare+Data+Export+Tool)  
to sync the commcare data to your own database, where you can run SQL  
queries.

Cory

> **···**
>
> On Mon, Nov 2, 2015 at 6:49 PM, Annegreet Ottow-Boekeloo \< annegreetboekeloo@gmail.com\> wrote:
> 
> > Is it possible to connect to the commcare database with our data directly,  
> > without API? So we could send SQL queries directly?
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Annegreet\_Ottow-Boek](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@Annegreet\_Ottow-Boek](https://forum.dimagi.com/u/Annegreet_Ottow-Boek)\
**Post date:** [November 3, 2015, 11:00am UTC](https://forum.dimagi.com/t/direct-connection-to-database/2464/3 "2015-11-03T11:00:04Z")

</div>

Thanks for the answer. Thats clear!

> **···**
>
> Op di 3 nov. 2015 om 08:03 schreef Cory Zue :
> 
> > Hey,
> > 
> > No, for security reasons this is not possible. We recommend using the data  
> > export tool  
> > [https://confluence.dimagi.com/display/commcarepublic/CommCare+Data+Export+Tool](https://confluence.dimagi.com/display/commcarepublic/CommCare+Data+Export+Tool)  
> > to sync the commcare data to your own database, where you can run SQL  
> > queries.
> > 
> > Cory
> > 
> > On Mon, Nov 2, 2015 at 6:49 PM, Annegreet Ottow-Boekeloo \< [annegreetboekeloo@gmail.com](mailto:annegreetboekeloo@gmail.com)\> wrote:
> > 
> > > Is it possible to connect to the commcare database with our data  
> > > directly, without API? So we could send SQL queries directly?
> > 
> > --
> > 
> > > You received this message because you are subscribed to the Google Groups  
> > > "commcare-users" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).
> > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "commcare-users" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/commcare-users/zLs-uM9E\_Dg/unsubscribe](https://groups.google.com/d/topic/commcare-users/zLs-uM9E_Dg/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
