Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 833627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:32:50+00:00 2026-05-15T04:32:50+00:00

I have a number of databases on a Domino Server (version 8.5) which I

  • 0

I have a number of databases on a Domino Server (version 8.5) which I need to find the counts of:

  • the number of documents in total per NSF
  • the number of documents in the “All Documents” view per NSF

Is there any simple way of getting Domino Server 8.5 to display this?

Many thanks
Chris

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:32:51+00:00Added an answer on May 15, 2026 at 4:32 am

    You can get the number of documents per NSF by enabling the Domain Catalog task on one of your domain’s servers. That will create a domain catalog database (catalog.nsf) with information on all the databases in the domain. You can then create a custom view in that database to organize the databases by total documents, etc.

    Unfortunately the cataloging process doesn’t track how many documents are in each view. Furthermore, there’s no guarantee each database even has an All Documents view. That view is part of many database design templates like Mail or Discussions, but it is really just a design element and not something fundamental to every notes database.

    Here is some code you can run to fetch that information for you on a given server. Note, this code is pretty slow.

    Sub CountDocuments()
    
    'Handle database not open error
    On Error Goto ProcessError
    On Error 4060 Goto ProcessNotOpenError
    On Error 4063 Goto ProcessNotOpenError
    On Error 4185 Goto ProcessNotOpenError
    
    'Constants
    Const SERVERNAME = "SERVER/DOMAIN"
    Const FILENAME = "C:\database_entry_counts.csv"
    
     'Initialize Objects
    Dim s As New Notessession
    Dim db As Notesdatabase
    Dim dbDirectory As NotesDbDirectory
    Dim docCollection As NotesDocumentCollection
    Dim doc As NotesDocument
    Dim strRow As String
    Dim numDocs As Long, numAllDocs As Long
    Dim viewAllDocs As NotesView
    Dim vecAllDocs As NotesViewEntryCollection
    Dim ve As NotesViewEntry
    Dim docCount As Long
    
     'Get Database Directory
    Set dbDirectory = s.GetDbDirectory(SERVERNAME)
    Set db = dbDirectory.GetFirstDatabase(DATABASE)
    flag = db.Open( "", "" )     
    While flag = False  'Get next database if first can't be opened
        Set db = dbDirectory.GetNextDatabase
        flag = db.Open( "", "" )     
    Wend
    
    'Open output file   
    Set stream = s.CreateStream
    If Not stream.Open(FILENAME, "ASCII") Then
        Messagebox FILENAME,, "Open failed"
        Exit Sub
    End If
    If stream.Bytes <> 0 Then
        Messagebox FILENAME,, "File already exists and has content"
        Exit Sub
    End If
    
    'Output headers
    Call stream.WriteText(|"Database Name","Total Documents","Count of All Documents"|, EOL_CRLF)
    
    
     'Main Loop
    While Not (db Is Nothing)
    
        Print "Working on: " & db.Title
    
        docCount = 0
        strRow = ""
    
        'Get number of documents in database (easy)
        numDocs = db.AllDocuments.Count
    
        'Get number of documents in view (annoyingly difficult)
        Set viewAllDocs = db.GetView("($All)")
        If Not (viewAllDocs Is Nothing) Then
            Set vecAllDocs = viewAllDocs.AllEntries
            Set ve = vecAllDocs.GetFirstEntry
            While Not (ve Is Nothing)
                If ve.IsDocument Then docCount = docCount + 1           
                Set ve = vecAllDocs.GetNextEntry(ve)
            Wend
        Else
            docCount = 0
        End If
    
        'Output values to our comma delimited list
        strRow = |"| & db.Title & |","| & numDocs & |","| & docCount & |"|
        Call stream.WriteText(strRow, EOL_CRLF)
    
        'Get next database that can be opened
        Set db = dbDirectory.GetNextDatabase
        If Not (db Is Nothing) Then flag = db.Open( "", "" )
        While flag = False  
            Set db = dbDirectory.GetNextDatabase
            If Not (db Is Nothing) Then flag = db.Open( "", "" )     
        Wend
    
    Wend
    
    'Close file
    Call stream.Close
    
    Exit Sub
    
    ProcessNotOpenError:
    
    Resume Next
    
    ProcessError:
    
    Messagebox "Error " & Err() & ": " & Error()
    If Not stream Is Nothing Then
        stream.Close
    End If
    
    Exit Sub
    
    End Sub
    

    This will output a CSV file with the database name, and the counts you’re looking for, provided you run this with an account that has access to all the databases on your server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a number of applications which I cannot modify(no source), they are hard
i have two values. one represents a number of objects $a = $product->count_all(); and
I have a number of classes doing different things but using the same Singleton
I have a table with a bunch of phone numbers queried from a database.
I have been trying to get this to work for most of the day
Is it possible to add a event to the domain service class? I have
I have an requirement where i have to profile / check that a paricular
I cant find the way to create overlays on the static google map through
My masters thesis is about discovering bad database design by analyzing metadata and the
Hey everyone. So what i am looking to do is achieve a cleaner url

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.