Register Login

Calculate size of repository in SAP Content Server database

Updated May 18, 2018

How to Calculate the size of repository in SAP Content Server database?


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
   num(substr(tablename,length(tablename)-3,4)) contrepnr,
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.