Personal Blog of Thomas Hampel - Creative Mythbusting in Development and Collaboration

Previous Document Next Document

How to enable/disable advanced DB properties such as DAOS

Thomas Hampel
 1 September 2011

Is 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
Tagged with: Code Development
Comments

1.) How to enable/disable advanced DB properties such as DAOS

Mladen http:// 08.04.2013 13:34:37

Thank you for this code that works well !

2.) How to enable/disable advanced DB properties such as DAOS

I bet when queried they did the USB thing bescuae of disk space and to ensure a backup copy :-)Don't be too hard on the trans log and DAOS being int he same place, some people only have one server, 1 hard drive or maybe 2 partitions to the drive.But yes, reality has a way of making things work that are not documented.

Go ElsewhereSubscribe to RSSAboutStay ConnectedAnd More
Thomas Hampel, All rights reserved.