Link to home
Create AccountLog in
Avatar of darenceang
darenceang

asked on

Count all documents in all database.

Hi!
I have a notes server running R6 and hosting quite a few apps.
ABC\ABC.nsf
DEF.nsf

I am trying to write an agent to look into each nsf inside the server name: MyNotesServer and return the TOTAL ( ALL ) DOCUMENTS count.

My code currently can only support one NSF and it must be set my me.

Is there a way to "auto" go into all the NSF inside the server and count all the documents?

Please advice.
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of darenceang
darenceang

ASKER

Dear bosman!
Thanks for the comment!

I did thought of getting the catalog.nsf
Thats what my boss told me to....

Is there any sample source codes out there that can show me how an agent will get the count for all the documents in the catalog.nsf depending on the individual nsf that i have in the database? Tabulate it and then send an email?

Thats what i m "tasked" to do but very lost as i m obviously not good in LotusScript... ( dont know why they tasked me... )

Your help is greatly appreciated!
Thanks in advance!
Good news: I think 99% can be done even without coding! All you have to do is
- create a new view, based on one of the existing views
- makes sure that all databases are shown in the view (e.g. by clearing the Select-statement for the view)
- add a column with the field DbNumDocuments, which contains the number of documents
- open that view in the Notes client
- File/Export, filename anything.wk4, select Lotus 123 as output format, and output the entire view to the file
- mail the file to the person wo asked for it

The file can be read in Excel.

The 1% that could be a problem is that you need to have this file sent every day, automatically. If that's the case, I'd suggest you tell taht person once and for all how to use the catalog-database himself. If he refuses to do that, or if he's the CEO, we'll help you with the code to send this mail!
HMmmmmmmmmmmmm.....
Cool!

But i think hes not the CEO... but my PM....
Cause apparently on our replicated servers, the replication does not seems to work quite well...
What is replicated on server A MIGHT not be reflected on Server B.

I;ve done up an agent to actually read only ONE database ( initially this was the plan ), read the same database on the other server, then mail them the results... but they were saying there will be around 80+ mails each day as there is around 80+ apps.

Thus, they need someone ( they thought i know Notes... ) though i did not specify it in my resume,... hahah!
to write out something.. to get all documents count of database in Server A ( thats where my question comes in ), all documents in server B... then put it side by side.. mail it to them...
;(

Any help is greatly appreciated!
btw... will try out the tip u suggested! ;) Cause i think i can generate the mail for that... do i have to create that view in the catalog? Also, there are some "default" database that is shown when i view the catalog... those that i think is used by notes, anyway to "hide" those?

Cheers!
The catalog contains info about ALL database. Whatever you don't want you should remove from your list. You could specify a separate category for the databases you need, so they would be visible even in the standard view under that category. There is no real need to overcome the problem of a different number per replica on separate servers. Make sure that both servers use a replica of the same catalog.nsf database, and that they replicate the entire database. Each replica is mentioned separately in the catalog database, have a look at the Databases/By Replica ID view.
;(
Bad news... they say i cannot create the view in the catalog.nsf...
;(
Then get your boss to push for you to be allowed todo so anyway.  Or, you could create a private view.