SQL query which can pull list of all pages form the confluence which was edited/updated or created Edited

Actually i want to find a SQL query which can pull list of all the pages form the my production environment in confluence which was edited/updated or created between specific time frame. I have found a sql macro related that and implemented that. But it didn't show any results. 

So is there any other way so that i can find the list of all the pages which were updated between some specific time frame. 

 

please reply asap.

 Thanks  

2 answers

1 accepted

1 vote
Answer accepted
Davin Studer Community Champion Oct 16, 2017

Does this work for you?

declare
@begin datetime,
@end datetime

set @begin = '01/01/2017'
set @end = '10/16/2017'

select *
from [dbo].[CONTENT]
where PREVVER is NULL
and CONTENTTYPE = 'PAGE'
and CONTENT_STATUS = 'current'
and (
(
CREATIONDATE >= @begin
and CREATIONDATE <= @end
)
or (
LASTMODDATE >= @begin
and LASTMODDATE <= @end
)
)

Hi Davin,

Thanks for the answer. Appreciate it.

Yes this works for me as required.

But i am also searching for a macro so that the data can be displayed on the confluence page and all the users can view the data.

So if any help regarding the macro is suggested then it will be a great help. 

 

Thanks and regards

Sandeep Anand

0 votes

Hi Sandeep,

I'm not sure of the exact SQL that would provide that, but you would be able to get the same results from a few different add-ons, such as the Archiving Plugin or the Reporting plugin.

I would recommend having a look at those, test them out, and see which one best suits your needs.

Kind Regards,
Shannon

Hi Shannon,

Thanks for the suggestions. Appreciate that.

But in my case, the plug-ins will not be effective. As i want to list all the pages which were edited or created between certain period of time and also their details that who has created or modified those pages.

Thanks and regards

Sandeep Anand

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,196 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you