Programmatically create database and namespace
Is there any COS API to create the database (with designated path) and the namespace ?
Also, the API to attach a given database to a given namespace?
Thanks.
Is there any COS API to create the database (with designated path) and the namespace ?
Also, the API to attach a given database to a given namespace?
Thanks.
Yes. Use the SYS.Database class to create a .DAT file, Config.Databases to create a database definition (what we used to call a dataset), and Config.Namespaces to create a namespace. These are all in %SYS, so you'll need the appropriate privileges.
It's a good idea to also have look at https://community.intersystems.com/post/deploying-applications-intersystems-cache-installer in case you have to create a CSP application, specific global mappings, etc.