Where to run queries?

Vasudeva Gupta April 19, 2023

I want to get last modified dates for all pages . The link below talks about Analytics, Data Center and Server; whereas how to go to the server and where exactly to run the queries? Help me to navigate to the place where I can run the query.

https://confluence.atlassian.com/doc/finding-unused-spaces-or-pages-107184852.html

4 answers

4 accepted

0 votes
Answer accepted
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2023

If you can't get access to the database to run those queries, you could just use the Page Status Browser provided by the Better Content Archiving app.

It allows working a tree control that shows the last update date:

page-status-browser (1).png

(Discl. it is a paid and supported app developed by our team.)

0 votes
Answer accepted
Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 19, 2023

It states 

If you have Confluence Server, you'll need to query the database directly to find out this information.

 

It's SQL language which you'd run in a database client, which is dependent on which database type your Confluence is connected to. Most commonly this would be PostgreSQL (but you might just as well be running a different database):

https://www.postgresql.org/docs/current/app-psql.html

 

But you could just as well be running on plenty other db types such as MySQL which uses a different client, etc.

 

However, you would of course need to also know where the database is running, the database name to connect to, credentials to use, and most importantly, running SQL directly can have devastating effect if you do not know what you're doing. I would suggest you talk to your sysadmin(s) who set up Confluence as they should be familiar with how to connect to the db and how to run queries in it.

 

That said, this is only specific to Server edition of Confluence, if you are in fact running Data Center (which you should imo because Server is nearing end of life), then you can use the "Insights" which is baked into data center, without having to run SQL - https://confluence.atlassian.com/doc/analytics-1044780333.html 

 

You can see more info about the database in "System info" page in Confluence (to determine the type for example), and the db settings are in <confluence_home>/confluence.cfg.xml file such as the address, name, and most importantly the credentials Confluence uses to talk with the db.

0 votes
Answer accepted
Fabrice Huart - NSI
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023
0 votes
Answer accepted
Fabrice Huart - NSI
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

Hi @Vasudeva Gupta ,

The queries must be run directly in your database associated to Confluence ( for Server and Datacenter versions of the product)

depending on the kind of database, you can use different tools to access it. For example , you can use tools like Pg Admin to access PostgreSQL

Or you can ask your database administrators to run the queries.

 

For Cloud you must go through Confluence Cloud Rest API, but not sure if this information is available.

Hope this helps,

Fabrice

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events