sec.ampsChangeModulesDatabase( old-db as (Number|String), new-db as (Number|String) ) as Sequence
This function changes all amps that refer to one modules database to refer to a different database. This is useful when using database replication for disaster recovery and a replica security database is being promoted to master during a disaster scenario.
Parameters | |
---|---|
old-db | The ID of the old modules database. |
new-db | The ID of the new modules database. |
// execute this against the security database declareUpdate(); const sec = require('/MarkLogic/security'); sec.ampsChangeModulesDatabase(xdmp.database("Security"),xdmp.database("Security-replica") ); // changes the database ID for all of the amps in the system to make the amps function correctly in a disaster recovery scenario.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.