Switching DAOS on via script or API

I want to enable DAOS programmatically…

The most obvious method would be to issue the correct COMPACT command at the server console but this means the database(s) are taken off-line while the copy-style compact runs, which I’d like to avoid. In addition I want to enable DAOS for new mail databases (containing no attachments) so the COMPACT, in this scenario, would be unnecessary.

As an alternative I was considering writing a $DAOS field to the database icon (value “1”) to switch DAOS on but I don’t want to do this unless someone can confirm that the $DAOS field on the icon is the only property that tells the server that a database uses DAOS (I’ve come across database properties, such as the soft-delete expiry interval, that are stored both on the database icon and “elsewhere” within the database properties - hence I’m not 100% sure the icon will be the only change needed for a database to have DAOS enabled).

So, to summarise, is writing “1” to a $DAOS field on the icon enough to enable DAOS, or should I wait for an API method to be published which will perform the necessary “magic”?

Many thanks for your thoughts :slight_smile:

Phil

Subject: Re: Switching DAOS on via script or API

Keep in mind that the -c and -daos options are independent. You can certainly enable the DAOS participation flag for an NSF by issuing a ‘compact -daos on filename.nsf’ without the -c option. If you do that, all subsequent new attachments will be considered for DAOS, but existing ones will remain in the NSF.

The -c option is a standard copy-style compact. When used together, the DAOS flag will be enabled and all of the existing attachments will be considered for participation in DAOS as they are copied to the new NSF by the CSC operation. It’s likely that you want the -c option also, but definitely not required.

Likewise, the ‘compact -daos off’ operation can also be performed independently. Any subsequent attachments will be stored in the NSF, and any existing DAOS references will continue to be serviced.

Subject: Many thanks

Thanks for the info. I’ll use compact without -c for new databases (they get -c’d once a week anyway so any attachments that might exist will be detached over the weekend).

  • Phil

Subject: compact

You are correct… The -c operation with respect to attachments is based on the DAOS participation flag setting at the time of the CSC. If you turn DAOS on Wednesday using ‘compact -daos on xyz.nsf’ and then do regular maintenance ‘compact -c’ on Sunday, any eligible attachments will be extracted during the Sunday run.