Published on InterSystems Developer Community (https://community.intersystems.com)

Home > API equivalent to 'Recreate a database' option in ^DATABASE routine?

Question
Steven LeBlanc · Dec 17, 2015

API equivalent to 'Recreate a database' option in ^DATABASE routine?

Hi,

Is there any API equivalent (within Config.Databases class, or elsewhere) that has the same functionality as the 'Recreate a database' option in the ^DATABASE routine?

This option was added to ^DATABASE (according to internal Devlog CFL1263):

to recreate a database which is equivalent to deleting the .DAT file and recreating it.

I tested this, and the recreate option also appears to also preserve the original database parameters (e.g. max size, resource name).  But when I separately try Delete, and then Create, it does not preserve those settings, so the 'Recreate' option provides additional functionality. 

Is there a way to accomplish this programmatically through a supported API, other than scripting the ^DATABASE routine?

Thanks,

Steve

#Databases #System Administration #Caché

Source URL:https://community.intersystems.com/post/api-equivalent-recreate-database-option-database-routine