internal static Exception ResumeLocalDatabaseCopy(IADDatabase database) { string localMachineFqdn = DatabaseTasks.LocalMachineFqdn; Exception ex = null; try { DatabaseCopyActionFlags flags = DatabaseCopyActionFlags.Replication | DatabaseCopyActionFlags.Activation; Dependencies.ReplayRpcClientWrapper.RequestResume2(localMachineFqdn, database.Guid, (uint)flags); } catch (TaskServerException ex2) { ex = ex2; } catch (TaskServerTransientException ex3) { ex = ex3; } if (ex != null) { DatabaseTasks.Trace("ResumeLocalDatabaseCopy(): Failed with exception: {0}", new object[] { ex }); return(ex); } return(null); }
// Token: 0x06001A35 RID: 6709 RVA: 0x0006E1E8 File Offset: 0x0006C3E8 private void TryResumeCopy(CopyStatusClientCachedEntry status) { Exception ex = null; string dbname = status.CopyStatus.DBName; string netbiosName = status.ServerContacted.NetbiosName; try { FullServerReseeder.Tracer.TraceDebug <string, string>((long)this.GetHashCode(), "FullServerReseeder: First attempting to resume database copy '{0}\\{1}' to avoid a reseed if possible.", dbname, netbiosName); ReplayCrimsonEvents.FullServerCopyResuming.Log <string, string, Guid>(dbname, netbiosName, status.DbGuid); this.m_resumesAttempted.Add(status.DbGuid, status); DatabaseCopyActionFlags flags = DatabaseCopyActionFlags.Replication | DatabaseCopyActionFlags.Activation | DatabaseCopyActionFlags.SkipSettingResumeAutoReseedState; Dependencies.ReplayRpcClientWrapper.RequestResume2(AmServerName.LocalComputerName.Fqdn, status.DbGuid, (uint)flags); } catch (TaskServerException ex2) { ex = ex2; } catch (TaskServerTransientException ex3) { ex = ex3; } if (ex != null) { FullServerReseeder.Tracer.TraceError <string, string, Exception>((long)this.GetHashCode(), "FullServerReseeder: Resuming database copy '{0}\\{1}' failed. Error: {2}", dbname, netbiosName, ex); ReplayCrimsonEvents.FullServerCopyResumeFailed.Log <string, string, Guid, string>(dbname, netbiosName, status.DbGuid, ex.Message); } }
protected override void RpcOperation() { Database database = this.DataObject.GetDatabase <Database>(); if (base.IsActivationRpcSupported) { DatabaseCopyActionFlags flags = DatabaseCopyActionFlags.Replication | DatabaseCopyActionFlags.Activation; if (this.ReplicationOnly) { flags = DatabaseCopyActionFlags.Replication; } ReplayRpcClientHelper.RequestResume2(base.GetServerFqdn(), database.Guid, (uint)flags); return; } ReplayRpcClientWrapper.RequestResume(base.GetServerFqdn(), database.Guid); }
internal static void SuspendLocalDatabaseCopy(IADDatabase database, string suspendMsg) { string serverNameFqdn = DatabaseTasks.LocalMachineFqdn; Exception ex = null; try { Action invokableAction = delegate() { DatabaseCopyActionFlags flags = DatabaseCopyActionFlags.Replication | DatabaseCopyActionFlags.Activation; Dependencies.ReplayRpcClientWrapper.RequestSuspend3(serverNameFqdn, database.Guid, suspendMsg, (uint)flags, 1U); }; InvokeWithTimeout.Invoke(invokableAction, TimeSpan.FromSeconds((double)RegistryParameters.FailureItemLocalDatabaseOperationTimeoutInSec)); } catch (ReplayServiceSuspendCommentException ex2) { DatabaseTasks.Trace("SuspendLocalDatabaseCopy(): Catching and ignoring exception: {0}", new object[] { ex2 }); } catch (TimeoutException ex3) { DatabaseTasks.Trace("SuspendLocalDatabaseCopy(): Failed on timeout: {0}", new object[] { ex3 }); ex = ex3; } catch (TaskServerException ex4) { ex = ex4; } catch (TaskServerTransientException ex5) { ex = ex5; } if (ex != null) { DatabaseTasks.Trace("SuspendLocalDatabaseCopy(): Failed with exception: {0}", new object[] { ex }); throw new DatabaseCopySuspendException(database.Name, Environment.MachineName, ex.ToString(), ex); } }
internal static void TryResumeDatabaseCopy(Guid dbGuid, string server, bool skipSettingResumeAutoReseedState = false) { try { DatabaseCopyActionFlags databaseCopyActionFlags = DatabaseCopyActionFlags.Replication | DatabaseCopyActionFlags.Activation; if (skipSettingResumeAutoReseedState) { databaseCopyActionFlags |= DatabaseCopyActionFlags.SkipSettingResumeAutoReseedState; } Dependencies.ReplayRpcClientWrapper.RequestResume2(server, dbGuid, (uint)databaseCopyActionFlags); } catch (TaskServerException arg) { ExTraceGlobals.SeederServerTracer.TraceDebug <TaskServerException>(0L, "SeedHelper.ResumeDatabaseCopy(): Catching and ignoring exception: {0}.", arg); } catch (TaskServerTransientException arg2) { ExTraceGlobals.SeederServerTracer.TraceDebug <TaskServerTransientException>(0L, "SeedHelper.ResumeDatabaseCopy(): Catching and ignoring exception: {0}.", arg2); } }
internal static void SuspendDatabaseCopy(Guid dbGuid, string server, string comment) { try { DatabaseCopyActionFlags flags = DatabaseCopyActionFlags.Replication | DatabaseCopyActionFlags.Activation; Dependencies.ReplayRpcClientWrapper.RequestSuspend3(server, dbGuid, comment, (uint)flags, 1U); } catch (ReplayServiceSuspendCommentException arg) { ExTraceGlobals.SeederServerTracer.TraceDebug <ReplayServiceSuspendCommentException>(0L, "SeedHelper.SuspendDatabaseCopy(): Catching and ignoring exception: {0}.", arg); } catch (ReplayServiceSuspendRpcPartialSuccessCatalogFailedException arg2) { ExTraceGlobals.SeederServerTracer.TraceDebug <ReplayServiceSuspendRpcPartialSuccessCatalogFailedException>(0L, "SeedHelper.SuspendDatabaseCopy(): Catching and ignoring exception: {0}.", arg2); } catch (TaskServerException ex) { throw new SeederSuspendFailedException(ex.Message, ex); } }
// Token: 0x06001961 RID: 6497 RVA: 0x00069D10 File Offset: 0x00067F10 private Exception ExecuteResume(AutoReseedWorkflowState state) { Exception ex = null; try { state.UpdateReseedRecoveryAction(ReseedState.Resume); this.LogBeginExecute(state); DatabaseCopyActionFlags arg = DatabaseCopyActionFlags.Replication | DatabaseCopyActionFlags.Activation | DatabaseCopyActionFlags.SkipSettingResumeAutoReseedState; FailedSuspendedCopyAutoReseedWorkflow.hookableResumeRpc.Value(AmServerName.LocalComputerName.Fqdn, base.Context.Database.Guid, (uint)arg); } catch (TaskServerException ex2) { ex = ex2; } catch (TaskServerTransientException ex3) { ex = ex3; } this.LogExecuteCompleted(state, ex); return(ex); }
protected override void RpcOperation() { Database database = this.DataObject.GetDatabase <Database>(); if (!base.IsActivationRpcSupported) { ReplayRpcClientWrapper.RequestSuspend(base.GetServerFqdn(), database.Guid, this.SuspendComment); return; } DatabaseCopyActionFlags flags = DatabaseCopyActionFlags.Replication | DatabaseCopyActionFlags.Activation; if (this.ActivationOnly) { flags = DatabaseCopyActionFlags.Activation; } if (base.IsRequestSuspend3RpcSupported) { ReplayRpcClientHelper.RequestSuspend3(base.GetServerFqdn(), database.Guid, this.SuspendComment, (uint)flags, 2U); return; } ReplayRpcClientWrapper.RequestSuspend2(base.GetServerFqdn(), database.Guid, this.SuspendComment, (uint)flags); }
// Token: 0x060020AF RID: 8367 RVA: 0x00096F33 File Offset: 0x00095133 internal override void RequestResume(DatabaseCopyActionFlags flags) { throw new ReplayServiceResumeRpcInvalidForSingleCopyException(base.Configuration.DisplayName); }
// Token: 0x060020AE RID: 8366 RVA: 0x00096F21 File Offset: 0x00095121 internal override void RequestSuspend(string suspendComment, DatabaseCopyActionFlags flags, ActionInitiatorType initiator) { throw new ReplayServiceSuspendRpcInvalidForSingleCopyException(base.Configuration.DisplayName); }