An der Berechtigung liegts nicht, wird mit der Server-ID ausgeführt.
Hier mal das Script:
Sub Initialize
Dim session As New NotesSession
Dim directory As NotesDBDirectory
Dim thisdb As NotesDatabase
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Set thisdb = session.CurrentDatabase
Set directory = New NotesDBDirectory(thisdb.Server)
Set db = directory.GetFirstDatabase(DATABASE)
NoAccess = False
Print "Starting checking quota..."
While Not (db Is Nothing)
On Error Goto NoAccessToDB
Call db.Open("", "")
If NoAccess <> True Then
dbsize = (db.size)/1024/1024
Set dbqdoc = thisdb.CreateDocument
dbqqdoc.Form = "dbqentry"
dbqdoc.Mail_Title = db.Title
dbqdoc.Mail_Filename = db.FilePath
dbqdoc.Mail_quota= db.SizeQuota
dbqdoc.Mail_size=dbsize
dbqdoc.Mail_server = db.Server
Print "Checking quota for " & db.Title
Call dbqdoc.Save(True, True)
Else
NoAccess = False
End If
Set db = directory.GetNextDatabase
Wend
Exit Sub
NoAccessToDB:
Set dbqdoc = thisdb.CreateDocument
dbqdoc.Form = "dbqentry"
dbqdoc.Mail_Title = "* Access Denied - " + db.Title
dbqdoc.Mail_Filename = db.FilePath
Call dbqdoc.Save(True, True)
NoAccess = True
Resume Next
Print "Ended checking quota..."
End Sub