How do I add a database to a mirror
I want to add a database to a mirror.
Is this the correct way to do so:
set status=##Class(SYS.Mirror).AddDatabase("/db/iknow")
Is the status=0 if it worked and anything else means it failed?
Thanks for any help
Product version: IRIS 2020.2
Assuming you have a sync mirror established, adding new db to mirror is as simple as:
Please note that some methods accept db name, most accept db directory, and others db sfn. Please keep that in mind.
Thanks for the fast reply
set status=##Class(SYS.Mirror).AddDatabase("/db/iknow")
I get a syntax error when I do:
IF $$$ISOK(status) {w "OK"} else {w "not OK"}
Although this works OK:
IF status {w "OK"} else {w "not OK"}
Any idea why this is so?
Are you doing this in console/terminal? Macros are not available there.
To check if you got an error in a terminal execute:
if sc=1 {w "OK"} else {w $system.Status.DisplayError(sc)}
I was running this from terminal - understood.
Thanks again.
Sorry, what is 'db sfn'?
SFN - system file number
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue