intructions on how to connect to the cloud db using an ODBC Connection.
Asked by Mdu:

We trying to to replicate the below connection and data extract for local reporting:

ODBC CONNECT32 TO Confluence (XUserId is \[Username\], XPassword is \[Password\])  
Content:  
sql select  
concat('<https://jira.isometrix.net/confluence/pages/viewpage.action?pageId=>', c.contentid),  
concat('<https://jira.isometrix.net/confluence/display/>', s.spacekey,'/',replace(c.title,' ','+') ) as displayurl,  
lower(lu.username) as likedby,  
lower(lu.username) = lower(cu.username) as likedbyself,  
c.contentid,  
c.contenttype,  
c.title,  
s.spacekey,  
lower(cu.username) as username,  
c.creationdate,  
to_char(c.creationdate, 'MONTH YYYY') as createmonthandyear,  
to_char(c.creationdate, 'MONTH') as concreatemonth,  
to_char(c.creationdate, 'YYYY') as concreateyear  
FROM content c  
left JOIN spaces s ON c.spaceid = s.spaceid  
LEFT JOIN bodycontent bc ON c.contentid = bc.contentid  
left join likes l on c.contentid=l.contentid  
left join user_mapping lu on l.username = lu.user_key  
left join user_mapping cu on c.creator = cu.user_key  
WHERE c.prevver IS NULL  
and lu.username is not null  
AND c.contenttype IN ('PAGE', 'BLOGPOST');  
TeamContent:  
IntervalMatch (creationdate,username)

LOAD C_From_Date, C_To_Date,username


Answers:
author: Pavel Junek
body: Hi [@Mdu](/t5/user/viewprofilepage/user-id/4520705),

Welcome to Atlassian community!

I'm afraid that the connection to the Atlassian Cloud database will not be allowed to you in any way, because only Atlassian Cloud apps has access to the DB. Atlassian cloud uses REST API for communication.

In the following thread, this is confirmed by Andy Heinzer from the Atlassian team:

* [Is there a way to connect to the jira cloud database using sql developer or squirrel sql client](https://community.atlassian.com/t5/Jira-questions/Is-there-a-way-to-connect-to-the-jira-cloud-database-using-sql/qaq-p/676203)

> *"Yeah sorry to report, but the Jira Cloud database is not accessible to Cloud subscribers. This is certainly something you could control if you were using the Server line of products as you would need to setup that up in order to connect Jira to a database on setup.*
>
> *However the Cloud offerings do not provide a means to directly access the SQL database in any way."*

comments: author: Mdu
body: Thank you Pavel. Is there any recommendations we can try out to resolve our problem. Any apps we can look at in the marketplace maybe that can deliver what we want to do?


author: Pavel Junek
body: Unfortunately, you can't access the Cloud database as such, but you may want to try this addon - [Database Exporter for Jira Cloud](https://marketplace.atlassian.com/apps/1221074/database-exporter-for-jira-cloud?tab=overview&hosting=cloud)


author: Mdu
body: Thank you. I see you mentioned Jira Cloud, will that still run on Confluence Cloud?


author: Pavel Junek
body: Oh, I'm sorry, I didn't notice it was just for Jira. There does not appear to be any such application available for Confluence Cloud.


author: Mdu
body: Okay thanks. Can this be escalated to confluence Cloud support team or there's definitely no workaround for our issue?


author: Nic Brough -Adaptavist-
body: There will be no connection to the database for Confluence Cloud.

You could raise an issue with the development team, but creating a connector for Confluence like there is for Jira is not something Atlassian is going to have any interest in doing, they will leave that to 3rd parties.

For the SQL you've got though, I doubt you'll ever get a connector that can write, and I would be looking to do it via the REST API


author: Mdu
body: Thank you [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454). Can you recommend any 3rd parties that can assist with some dev work to assist us?


author: Nic Brough -Adaptavist-
body: I'd recommend Atlassian partners (I work for one), because they all have people who understand the way Atlassian products work. See <https://partnerdirectory.atlassian.com>


Tags: cloud

confluence-cloud