How to Calculate the size of repository in SAP Content Server database?
SOLUTION
Please follow the steps below in order to calculate the size of the repository in SAP Content Server database:
- First, start a database administration tool 'Database Studio'
- Now please open the SQL session to the Content Server database.
- Then connect with the user SAPR/3
- Now execute the below statement
select
contrepname,
num(substr(tablename,length(tablename)-3,4)) contrepnr,
sum(TREEINDEXSIZE+TREELEAVESSIZE+ LOBSIZE) contrepsize
from files f, tables t, contrep
where t.tableid = f.fileid and
(tablename like 'COMPONENTS%' or tablename like 'DOCUMENTS%') and
contrepnr = num(substr(tablename,length(tablename)-3,4))
group by contrepname, num(substr(tablename,length(tablename)-3,4))
Now after executing the above statement, a result will be shown which will contain the repository name, the repository number and the size occupied by each repository in KB.