Query results for : September 2011
How to enable/disable advanced DB properties such as DAOS- 1 September 2011 - (2) Comments
Thomas Hampel
1 September 2011Is it possible to set / remove the DAOS - flag in the advanced DB properties via Script??
Up to now I thought its possible to do it in the same way as for all the other DB flags as shown in this technote.
https://www-304.ibm.com/support/docview.wss?rs=899&uid=swg21244071
But it looks like the DAOS flag isnt stored in there....
Well in fact they are stored in there... but they are only exposed with ODS51 and the flag is not written to the $Flags field but written to a $DAOS field.
$DAOS=1 means enabled
$DAOS=0 means disabled
One could set the flag by using the small script supplied in the technote above and referring to the $DAOS field instead, but wait there's a better option:
Just use an (undocumented) LotusScript method "GetOption" and "SetOption" of the NotesDatabase class.
Call NotesDatabase.SetOption(81,true) will enable DAOS
Option Public
Option Declare
Sub Initialize
'# Server name in canonical format, use "" for client:
Const Servername$ = ">>>your server name here<<<"
Dim db As NotesDatabase
Dim dbdir As New NotesDbDirectory(servername)
Set db = dbdir.GetFirstDatabase(DATABASE)
While Not db Is Nothing
'# Skip databases which you don't have access to
On Error 4060 GoTo Error4060
Call db.Open(servername, db.FilePath)
Call db.setoption(DBOPT_LZCOMPRESSION, True)
Call db.setoption(81, True) '# DAOS Enable
GetNextDb:
Set db = dbdir.GetNextDatabase()
Wend
Exit Sub
Error4060:
'# If the code reaches here then the agent does not have access rights to the db.
Print db.FilePath & " incorrect rights to access!"
Resume GetNextDb
End Sub