How can I export a list of databases resident on a given Domino server?

Will Wagner picture Will Wagner · Nov 12, 2008 · Viewed 10.8k times · Source

I have a Lotus Domino server with a truly astounding number of Domino databases on it, arranged in various folders.

Is there some means of exporting a list of all these databases, with their titles and creators' names, in a spreadsheet format of some kind? I have the Domino Admin and Domino Designer software, and I have or can get whatever access rights I'd need.

Answer

Ed Schembor picture Ed Schembor · Jun 26, 2009

Actually, you can use a very simple Lotuscript agent to connect to a server and walk through all databases on the server, using the NotesDbDirectory class. Here is some code, modified slightly from what's in the 6.5 Help files - this dumps the title and path of all databases to a csv file. Note: the one argument to the GetFirstDatabase method let's you specify which objects on the server you want to scan - 1247 is the constant for "Databases" - basically, all NSF files. There are other constants for finding templates only (NTF's), only database with replication enabled, etc.

Sub Initialize
    Dim db As NotesDatabase
    Dim f As Integer
    f = Freefile
    Open "c:\dbExport.csv" For Output As #f

    Dim dbdir As New NotesDbDirectory("")  ' opens LOCAL - put a server name here
    Set db = dbdir.GetFirstDatabase(1247)  ' all databases - NSF, NSG and NSH (no templates)
    While Not(db Is Nothing)
        Print #f, """" + db.Title + """, """ + db.FileName + """"
        Set db = dbdir.GetNextDatabase
    Wend
    Close #f
End Sub