List docs successfully ingested into CP MetaStore


You may, sometimes, want to be sure about the number of documents that have been scanned and recorded in the metadata database (MetaStore).

First, you will need the ID of the repository concerned. Run the following SQL script (with SQL Server Management Studio for example).


Identify the repository in the list, for example number 3 here and run the following script.


We have now the list of documents recorded in the database. At the bottom right, Management Studio gives you the row count, here 6541 rows.



How To-Best Practice
Comment List
  • When the Metastore is showing an initial count of the files in the repo correctly, then a rescan occurs, and the count only grows rather than shrinks with the items that were removed/added - outside of the repository - which log would reflect the errors that seem to be occurring in the update of the Metastore DB?  The sync and ingest metastore logs all seem to know and reflect what should happen - but the repository always continues to be incorrect. The files that were removed at the source remain in the Repository.