private void PerformDatabaseSeed() { ExTraceGlobals.CmdletsTracer.TraceDebug <ObjectId>((long)this.GetHashCode(), "UpdateDatabaseCopy: PerformDatabaseSeed: {0}", this.DataObject.Identity); using (TaskSeeder taskSeeder = this.ConstructSeeder()) { taskSeeder.SeedDatabase(); } }
internal void SeedDatabase(ReplayConfiguration config) { ReplayState replayState = config.ReplayState; if (config is RemoteReplayConfiguration) { string targetMachine = config.TargetMachine; try { string machineFqdn = targetMachine; string destinationLogPath = config.DestinationLogPath; string destinationEdbPath = config.DestinationEdbPath; TDataObject dataObject = this.DataObject; AddDatabaseCopyTaskBase <TDataObject> .CheckSeedingPath(machineFqdn, destinationLogPath, destinationEdbPath, dataObject.LogFilePrefix); } catch (SeedingPathWarningException ex) { if (this.m_SeedingPostponedSpecified) { base.WriteWarning(ex.Message); } return; } catch (SeedingPathErrorException exception) { base.WriteError(exception, ErrorCategory.InvalidOperation, this.Identity); } SystemConfigurationTasksHelper.TryCreateDirectory(this.m_server.Fqdn, config.DestinationLogPath, Database_Directory.GetDomainWidePermissions(), new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.TaskWarningLoggingDelegate(this.WriteWarning)); using (TaskSeeder taskSeeder = this.ConstructSeeder()) { taskSeeder.SeedDatabase(); } return; } throw new NotSupportedException(config.GetType() + " is not supported"); }