// Token: 0x060001AF RID: 431 RVA: 0x0000AA50 File Offset: 0x00008C50 internal void RemountDatabase(Guid mdbGuid, MountFlags mountFlags, DatabaseMountDialOverride mountDialOverride, AmServerName fromServer, AmDbActionCode actionCode) { AmTrace.Debug("RemountDatabase ({0},{1},{2},{3},{4}) called", new object[] { mdbGuid, mountFlags, mountDialOverride, fromServer, actionCode }); ActiveManagerCore.ValidatePamOrStandalone("RemountDatabase"); IADDatabase iaddatabase = this.AdLookup.DatabaseLookup.FindAdObjectByGuidEx(mdbGuid, AdObjectLookupFlags.ReadThrough); if (iaddatabase == null) { throw new AmDatabaseNotFoundException(mdbGuid); } AmDbRemountOperation amDbRemountOperation = new AmDbRemountOperation(iaddatabase, actionCode); amDbRemountOperation.Flags = mountFlags; amDbRemountOperation.MountDialOverride = mountDialOverride; amDbRemountOperation.FromServer = fromServer; amDbRemountOperation.Enqueue(); AmDbCompletionReason amDbCompletionReason = amDbRemountOperation.Wait(); AmTrace.Debug("RemountDatabase({0}) completed (reason={1})", new object[] { mdbGuid, amDbCompletionReason }); }
// Token: 0x060001AD RID: 429 RVA: 0x0000A918 File Offset: 0x00008B18 internal void ReportSystemEvent(AmSystemEventCode eventCode, string reportingServer) { AmTrace.Debug("ReportSystemEvent({0},{1}) called", new object[] { eventCode, reportingServer }); ReplayCrimsonEvents.SystemEventReported.Log <AmSystemEventCode, string>(eventCode, reportingServer); ActiveManagerCore.ValidatePamOrStandalone("ReportSystemEvent"); AmServerName amServerName = new AmServerName(reportingServer); AmSystemManager.Instance.StoreStateMarker.SetStoreState(amServerName, eventCode); if (eventCode == AmSystemEventCode.StoreServiceStarted) { AmEvtStoreServiceStarted amEvtStoreServiceStarted = new AmEvtStoreServiceStarted(amServerName); amEvtStoreServiceStarted.Notify(); return; } if (eventCode == AmSystemEventCode.StoreServiceStopped) { new AmEvtStoreServiceStopped(amServerName) { IsGracefulStop = true }.Notify(); return; } if (eventCode == AmSystemEventCode.StoreServiceUnexpectedlyStopped) { new AmEvtStoreServiceStopped(amServerName) { IsGracefulStop = false }.Notify(); } }
// Token: 0x060001A7 RID: 423 RVA: 0x0000A4FC File Offset: 0x000086FC internal void DismountDatabase(Guid mdbGuid, UnmountFlags flags, AmDbActionCode actionCode) { AmTrace.Debug("Task: DismountDatabase({0},{1},{2}) called", new object[] { mdbGuid, flags, actionCode }); ActiveManagerCore.ValidatePamOrStandalone("DismountDatabase"); IADDatabase iaddatabase = this.AdLookup.DatabaseLookup.FindAdObjectByGuidEx(mdbGuid, AdObjectLookupFlags.ReadThrough); if (iaddatabase == null) { throw new AmDatabaseNotFoundException(mdbGuid); } AmDbDismountOperation amDbDismountOperation = new AmDbDismountOperation(iaddatabase, actionCode); amDbDismountOperation.Flags = flags; amDbDismountOperation.Enqueue(); AmDbCompletionReason amDbCompletionReason = amDbDismountOperation.Wait(); AmTrace.Debug("DismountDatabase({0}) completed (reason={1})", new object[] { mdbGuid, amDbCompletionReason }); }
// Token: 0x060001A8 RID: 424 RVA: 0x0000A59C File Offset: 0x0000879C internal void MoveDatabase(Guid mdbGuid, MountFlags mountFlags, UnmountFlags dismountFlags, DatabaseMountDialOverride mountDialOverride, AmServerName fromServer, AmServerName targetServer, bool tryOtherHealthyServers, AmBcsSkipFlags skipValidationChecks, AmDbActionCode actionCode, string moveComment, ref AmDatabaseMoveResult databaseMoveResult) { AmTrace.Debug("Task: MoveDatabase({0},{1},{2},{3},{4},{5},{6},{7},'{8}') called", new object[] { mdbGuid, mountFlags, dismountFlags, mountDialOverride, fromServer, targetServer, tryOtherHealthyServers, actionCode, moveComment }); ActiveManagerCore.ValidatePamOrStandalone("MoveDatabase"); ThirdPartyManager.PreventOperationWhenTPREnabled("MoveDatabase"); IADDatabase iaddatabase = this.AdLookup.DatabaseLookup.FindAdObjectByGuidEx(mdbGuid, AdObjectLookupFlags.ReadThrough); if (iaddatabase == null) { throw new AmDatabaseNotFoundException(mdbGuid); } AmDbMoveOperation amDbMoveOperation = new AmDbMoveOperation(iaddatabase, actionCode); AmDbMoveArguments arguments = amDbMoveOperation.Arguments; AmDbCompletionReason amDbCompletionReason = AmDbCompletionReason.None; arguments.MountFlags = mountFlags; arguments.DismountFlags = dismountFlags; arguments.MountDialOverride = mountDialOverride; arguments.SourceServer = fromServer; arguments.TargetServer = targetServer; arguments.TryOtherHealthyServers = tryOtherHealthyServers; arguments.SkipValidationChecks = skipValidationChecks; arguments.MoveComment = moveComment; amDbMoveOperation.Arguments = arguments; amDbMoveOperation.Enqueue(); try { amDbCompletionReason = amDbMoveOperation.Wait(); } finally { if (amDbMoveOperation.DetailedStatus != null) { databaseMoveResult = amDbMoveOperation.ConvertDetailedStatusToRpcMoveResult(amDbMoveOperation.DetailedStatus); } } AmTrace.Debug("MoveDatabase({0}) completed (reason={1})", new object[] { mdbGuid, amDbCompletionReason }); }
// Token: 0x060001AA RID: 426 RVA: 0x0000A74C File Offset: 0x0000894C internal List <AmDatabaseMoveResult> ServerMoveAllDatabases(AmServerName sourceServer, AmServerName targetServer, MountFlags mountFlags, UnmountFlags dismountFlags, DatabaseMountDialOverride mountDialOverride, bool tryOtherHealthyServers, AmBcsSkipFlags skipValidationChecks, AmDbActionCode actionCode, string moveComment, string componentName) { AmTrace.Debug("ServerMoveAllDatabases() called: sourceServer='{0}', targetServer='{1}', mountFlags='{2}', dismountFlags='{3}', mountDialOverride='{4}', tryOtherHealthyServers='{5}', skipValidationChecks='{6}', actionCode='{7}', MoveComment='{8}' Component='{9}'", new object[] { sourceServer, targetServer, mountFlags, dismountFlags, mountDialOverride, tryOtherHealthyServers, skipValidationChecks, actionCode, moveComment, componentName }); ActiveManagerCore.ValidatePamOrStandalone("ServerMoveAllDatabases"); ThirdPartyManager.PreventOperationWhenTPREnabled("ServerMoveAllDatabases"); AmDbMoveArguments amDbMoveArguments = new AmDbMoveArguments(actionCode); amDbMoveArguments.SourceServer = sourceServer; amDbMoveArguments.TargetServer = targetServer; amDbMoveArguments.MountFlags = mountFlags; amDbMoveArguments.DismountFlags = dismountFlags; amDbMoveArguments.MountDialOverride = mountDialOverride; amDbMoveArguments.TryOtherHealthyServers = tryOtherHealthyServers; amDbMoveArguments.SkipValidationChecks = skipValidationChecks; amDbMoveArguments.MoveComment = moveComment; amDbMoveArguments.ComponentName = componentName; if (string.IsNullOrEmpty(sourceServer.Fqdn)) { return(MoveBackToServer.Move(amDbMoveArguments)); } AmEvtMoveAllDatabasesBase amEvtMoveAllDatabasesBase; if (actionCode.IsAutomaticManagedAvailabilityFailover) { amEvtMoveAllDatabasesBase = new AmEvtMoveAllDatabasesOnComponentRequest(sourceServer); } else { amEvtMoveAllDatabasesBase = new AmEvtMoveAllDatabasesOnAdminRequest(sourceServer); } amEvtMoveAllDatabasesBase.MoveArgs = amDbMoveArguments; amEvtMoveAllDatabasesBase.Notify(); amEvtMoveAllDatabasesBase.WaitForSwitchoverComplete(); AmTrace.Debug("ServerMoveAllDatabases({0}) completed", new object[] { sourceServer }); return(amEvtMoveAllDatabasesBase.GetMoveResultsForOperationsRun()); }
// Token: 0x060001A9 RID: 425 RVA: 0x0000A6F4 File Offset: 0x000088F4 internal void ServerSwitchOver(AmServerName sourceServer) { AmTrace.Debug("ServerSwitchover({0}) called", new object[] { sourceServer }); ActiveManagerCore.ValidatePamOrStandalone("ServerSwitchOver"); AmEvtSwitchoverOnShutdown amEvtSwitchoverOnShutdown = new AmEvtSwitchoverOnShutdown(sourceServer); amEvtSwitchoverOnShutdown.Notify(); amEvtSwitchoverOnShutdown.WaitForSwitchoverComplete(); AmTrace.Debug("ServerSwitchover({0}) completed", new object[] { sourceServer }); }