NotesDBDirectory and agent running progressively slower

I have an agent that’s taking progressively longer, the more databases it touches through NotesDBDirectory.

I’m looping through all databases in NotesDBDirectory, and checking to see if the database is open, and if not, opening it before I get the various properties, log user activity and the ACL details.

I am creating a DB analysis document for every database on a number of servers (picked up from a profile document), and the longer this agent runs, the more it slows down.

I thought it was the user activity logging (in the Sandbox, needed a bit of tweaking if user activity isn’t logged - has to be told twice) that was slowing it down, but it seems it might be the fact of having so many databases open… we’re talking over 1,000 here.

Question: Do I have to open the database if I want to access a link to the database? I’ve seen in the Help (http://www-12.lotus.com/ldd/doc/lotusscript/lotusscript.nsf/1efb1287fc7c27388525642e0074f2b6/1f82ab14864680138525642e007687cb?OpenDocument mmm Notes URLs!) which properties I can access when theh db isn’t open, but I really want to put a link to the database in the analysis doc. Actually… I could probably put a button on the analysis doc that picks up the server and filepath, and opens from there. Probably easier eh? But then I’m still left with this:

b) Still can’t find a method to close a DB after it’s been opened, accessed and processed… sigh

This is from the above link:


A NotesDatabase retrieved from a NotesDbDirectory object is closed. The following properties are available on the closed database: FileName, FilePath, IsOpen, LastModified, Parent, ReplicaID, Server, Size, SizeQuota, Title. To access all the properties and methods of a database retrieved from a NotesDbDirectory, a script must explicitly open the database.


Personally it drives me nuts that you have different properties available depending on which method you use to access the database!

Cheers for any available insight and help,

Marion

Subject: NotesDBDirectory & agent running on other servers

I have something else to ask about this.

c) I want to run my DB polling agent, which loops through databases on servers using the NotesDBDirectory class, and I really really want to run it scheduled, signed by a server ID.

Is this the best route to go? The servers are on the same domain. It loops through numerous servers in the same domain, but from one server that’s a bit more out of the way than the main production servers. We have had better results when the agent is run manually by one of the Notes admins… but we need to be able to schedule this agent to be run probably once a month at the most. And we can’t babysit it each time.

Cheers for any insight,

Marion

:slight_smile:

Subject: RE: NotesDBDirectory & agent running on other servers

we didn’t see your code, but do you have something like set db = nothing

JYR

Subject: NotesDBDirectory and agent running progressively slower

There may be no way to explicitly close a database, but you should be able to release it completely if you Delete the reference before getting the next database. (No guarantees, just a best guess.)