To whom it may concern
I am looking how to get a Jira project size and pages. # of attachment, attachment size information. Jira is using Microsoft SQL server on-premises.
I used the script below, and I get "Invalid object name 'CONTENT'."
select count(CONTENTID) as "number of attachments", SPACES.SPACENAME from CONTENT
join SPACES on CONTENT.SPACEID = SPACES.SPACEID
where CONTENT.SPACEID is not null
and CONTENT.PREVVER is null
and CONTENT.CONTENTTYPE = 'ATTACHMENT'
group by SPACES.SPACENAME
order by "number of attachments" desc;
Thanks in advance
Barton
Welcome to the Atlassian Community!
Yeah, this is another reason for not looking at any Atlassian database. Your SQL isn't for Jira, it's for Confluence.
And it's wrong, because you're not going to get the right information from it.
Forget the database, you're wasting your time.
For Jira attachment size, look at your server - the simplest option is to look at the size of the directory <your jira data directory>/attachments
Jira "project size" is not an easy calculation - you'd need to read every part of Jira that stories bits of issues, look at the content in there, and reverse-engineer exactly how the database stores each line in the tables in the files the database is made up of.
Thanks, Nic information. Your information was useful and helpful.
Please advise what the story behind we could not get information from database the same as confluence.
Barton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To look at a single issue, without any custom fields, you're looking at 20-30 joins.
Don't do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.