Skip to main content

SYS.MirrorConfiguration

This class provides the interface for mirroring to be configured.

Method Inventory

Methods

classmethod AddDatabaseToMirrorSet(Directory As %String, DBMirrorName As %String) as %Status

Marks as an existing database as part of a mirror. Can only be run on the primary mirror member.

Return Value:
      TRUE = Database added to the active mirror set
      FALSE = failed to add database to the active mirror set

classmethod AddFailoverMember(MirrorSetMemberConfig As Config.MapMirrors) as %Status
classmethod CreateNewMirror(MirrorSetConfig As Config.Mirrors, MirrorSetMemberConfig As Config.MapMirrors, MirrorMemberConfig As Config.MirrorMember) as %Status
classmethod CreateNewShadow(MirrorName As %String, ByRef Properties As %String, MirrorMember As Config.MirrorMember, AsyncType As %Integer = 2, StartMirror As %Boolean = 1, ShadowAddr As %String = "", MirrorAddress As %String = "", AgentAddress As %String = "") as %Status
classmethod DefaultSystemName() as %String
Default system name for the local system, it returned the value of $SYSTEM. But if the length is greater than MaxMirrorSYSLen then it returned a null string.
classmethod DejournalPauseDatabase(DBPath As %String) as %Status
Stop dejournaling a database on a backup or an async member.

Dejournaling is restarted when the system is restarted or when the catchup method is used to restore the missing data to the database and link it into the active journaling system.

Returns:
final classmethod DemotePartnerToAsyncMember(MirrorName As %String = "") as %Status
Demote the other failover member to an async DR member.
This method would make the other backup mirror member to become an async member in the mirror set.
'MirrorName' - the mirror set name.
NOTE: this method may now be called by the EM Mirror Service to demote a failover.
final classmethod DemoteToAsyncMember(MirrorName As %String = "", NewMember As %String = "", AsyncType As %Integer = 2, NotifyPrimary As %Boolean = 1, AlwaysStartMirror As %Boolean = 0) as %Status
Demote a failover member to an async DR member.
This method would make the backup mirror member to become an async member with or without a new failover member in the mirror set.
'MirrorName' - the mirror set name.
'NewMember' - a new failover member to be added (if not exist) or converted (if exist) in the mirror list. The format of the 'NewMember' is a $List with $LB(SystemName, SystemGUID, ECPAddress|SSPort, MirrorAddress|SSPort, AgentAddress|AgentPort, InstanceDirectory, MemberType, ConnectsTo). It would be a null string if no new failover member to add.
'AsyncType' - The async member type for the local system to be demoted to, value of 2 for Async member.
'NotifyPrimary' - A boolean value to notify the primary member that this system has been removed as a failover member.
'AlwaysStartMirror' - A boolean value to always start mirror connection. NOTE: this method may now be called by the EM Mirror Service to demote a failover.
classmethod DoSSLConfigurationsExist(ByRef DN As %String) as %Status
classmethod ForceBecomePrimary() as %Status
classmethod GetAgentAddress() as %String
This method is called by Mirror pages to return AgentAddress.
classmethod GetAgentPort() as %String
This method is called by Mirror pages to return AgentPort, with default = 2188.
classmethod GetListOfNonFailoverDB(ByRef dblist As %String) as %Integer
classmethod GetMirrorInfo() as %String
Returns a comma delimeted list of the mirror name/names which this instance has loaded or is configured to load. For Failover members there is only ever one entry here. For async and reporting members they may join multiple mirrors and so a set of names may be returned.

This method looks first at the loaded mirrors and if there aren't any, reads the configuration to get the set of configured mirrors.

Called by the EMS server via a RunMethod() call which is why this returns a string rather than a %List (RunMethod() routines cannot return a %List).
classmethod GetSSLDNField() as %List
classmethod IsIPFormatValid(IP As %String, ByRef Type As %String = "", IPformatOnly As %Boolean = 0) as %Status
classmethod JoinExistingMirror(MirrorSetConfig As Config.Mirrors, ThisMirrorMember As Config.MapMirrors, ThisMember As Config.MirrorMember, OtherMirrorMember As Config.MapMirrors) as %Status
final classmethod PromoteToFailoverMember(MirrorName As %String = "", ByRef DownList As %String, ByRef SelectedPartner As %String = "", Standalone As %Boolean = 0, VIPInterface As %String = "", NoFailover As %Boolean = 0, Flags As %Integer = 0) as %Status
Promote an async DR (Disaster Recovery) member to a failover member in a mirror set.
This method could only be called in a DR member and only one mirror set is tracked by this mirror member. Callers need to pay attention to the returned 'DownList', it indicates one or more failover member is not reachable through ISCAgent. Operator needs to decide if he could pick one of the failover member to be the new partner of this promoted failover member.
'MirrorName' - the mirror set name.
'DownList' - list of the failover members are not reachable through the ISCAgent, separated by ",".
'SelectedPartner' - use the selected failover member as the new partner for the new sets of failover members in the mirror set.
'Standalone' - The DR member will be promoted to primary without any failover member partner. And the current failover members will be demoted to DR async members. When this is set the 'SelectedPartner' will be ignored.
'VIPInterface' - The virtual address interface name for this async member to be promoted when VIP is configured in Mirrors section.
'NoFailover' - This value is only valid when 'Standalone' is true, when this value is true the promoted failover member won't become primary until users cleared the 'No Failover'.
'Flags' - Flags for this promote method.
1: Safe mode, failed if any failover member can't be contacted through agent.
2: CheckOnly mode, check whether this promotion could be succeed. The DownList and SelectedPartner could be returned with non-null. Usually the Safe mode is also set from SYS.Mirror.PromoteCheck(). Note that even the method retruned 'OK' status, the 'DownList' could still be non-null string when the primary is running and the other failover member is not reachable. NOTE: this method may now be called by the EM Mirror Service to promote a DR async.
classmethod RemoveLocalMirrorConfiguration(mirname As %String, DeleteDBs As %Boolean = 0, CleanJournal As %Integer = 1) as %Status
classmethod RemoveMirrorConfiguration(DeleteDB As %Boolean = 0, CleanJournal As %Integer = 1, CleanSSL As %Boolean = 0) as %Status
classmethod RemoveOneMirrorSet(MirrorName As %String, DeleteDBs As %Boolean = 0, CleanJournal As %Integer = 1) as %Status
classmethod RetrieveMirrorConfig(MirrorSetName As %String, AgentIPAddress As Config.Host, MirrorAgentPort As %Integer, InstanceName As %String, ByRef Status As %Status = "", ByRef Unicode As %Integer = 0, SaveNode As %String = "", ByRef EMSManaged As %Integer) as Config.Mirrors
classmethod RetrieveMirrorMemberConfig(MirrorSetName As %String, AgentIPAddress As Config.Host, MirrorAgentPort As %Integer, InstanceName As %String, ByRef Status As %Status = "", SaveNode As %String = "", AllNodes As %Boolean = 0, MirrorsNode As %String = "", ByRef MemberFull As %Boolean) as Config.MapMirrors
classmethod ValidateVirtualAddress(VA As %String, Type As %Integer = 0, Interface As %String = "") as %Status
final classmethod VerifyMirrorSSLCertificates(MirrorSetName As %String = "", AllMembers As %Boolean = 0, RetrieveInfo As %String = "") as %Status
Verifiy mirror SSL certificates again all mirror members or between all members. When AllMembers is set, this verifies all all SSL certificates betwen each members except between reporting async members. When RetrieveInfo is not a null string then the mirror configuration has not been saved yet. We need to retrieve member info from failover member. This returned any error detected in %Status, callers need to use $SYSTEM.Status methods to get all the errors to display.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab