Commit 22dfa0d221ebc5ecfd98fdc84f2508e9c8a0e8ec

Authored by Schwirg László
1 parent b88c43dc

v1.22.2.0

Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs
@@ -537,7 +537,13 @@ namespace Vrh.Log4Pro.MaintenanceConsole.SQLDataBaseManagerNS @@ -537,7 +537,13 @@ namespace Vrh.Log4Pro.MaintenanceConsole.SQLDataBaseManagerNS
537 smoBackup.Database = sqlserver.ConnectionContext.DatabaseName; 537 smoBackup.Database = sqlserver.ConnectionContext.DatabaseName;
538 smoBackup.MediaDescription = "Disk"; 538 smoBackup.MediaDescription = "Disk";
539 smoBackup.Devices.AddDevice(backupFullName, DeviceType.File); 539 smoBackup.Devices.AddDevice(backupFullName, DeviceType.File);
540 - smoBackup.SqlBackup(sqlserver); 540 + //smoBackup.
  541 + smoBackup.PercentComplete += SmoBackup_PercentComplete;
  542 + smoBackup.PercentCompleteNotification = 1;
  543 + smoBackup.SqlBackupAsync(sqlserver);
  544 + Console.WriteLine("");
  545 + smoBackup.Wait();
  546 + Console.WriteLine("");
541 547
542 returnfilename = backupFullName; 548 returnfilename = backupFullName;
543 if (createzip) 549 if (createzip)
@@ -556,8 +562,14 @@ namespace Vrh.Log4Pro.MaintenanceConsole.SQLDataBaseManagerNS @@ -556,8 +562,14 @@ namespace Vrh.Log4Pro.MaintenanceConsole.SQLDataBaseManagerNS
556 return returnfilename; 562 return returnfilename;
557 } 563 }
558 564
559 - #region private methods  
560 - public static List<FileInfo> GetBackupFilePathList(SQLDataBase sqld) 565 + private static void SmoBackup_PercentComplete(object sender, PercentCompleteEventArgs e)
  566 + {
  567 + Console.SetCursorPosition(0, Console.CursorTop);
  568 + Console.Write($"Database backup completed: {e.Percent}%. {e.Message}");
  569 + }
  570 +
  571 + #region private methods
  572 + public static List<FileInfo> GetBackupFilePathList(SQLDataBase sqld)
561 { 573 {
562 var filenamemask = Path.GetFileNameWithoutExtension(sqld.Xml_BackupFileNameMask); 574 var filenamemask = Path.GetFileNameWithoutExtension(sqld.Xml_BackupFileNameMask);
563 var vars = new Dictionary<string, string>(); 575 var vars = new Dictionary<string, string>();
Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; @@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
32 // You can specify all the values or you can default the Build and Revision Numbers 32 // You can specify all the values or you can default the Build and Revision Numbers
33 // by using the '*' as shown below: 33 // by using the '*' as shown below:
34 // [assembly: AssemblyVersion("1.0.*")] 34 // [assembly: AssemblyVersion("1.0.*")]
35 -[assembly: AssemblyVersion("1.22.1.0")]  
36 -[assembly: AssemblyFileVersion("1.22.1.0")] 35 +[assembly: AssemblyVersion("1.22.2.0")]
  36 +[assembly: AssemblyFileVersion("1.22.2.0")]