Backup backup = new Backup(); backup.Action = BackupActionType.Database; backup.BackupSetDescription = "BackupDataBase description"; backup.BackupSetName = "megha"; backup.Database = "rukmini"; BackupDeviceItem deviceItem = new BackupDeviceItem( backupDestinationFilePath, DeviceType.File); backup.Devices.Add(deviceItem); ServerConnection connection = new ServerConnection(@"PHYZER-PCS"); connection.LoginSecure = false; connection.Login = "sa"; connection.Password = "phyzer1234"; Server sqlServer = new Server(connection); backup.Initialize = true; backup.Checksum = true; backup.ContinueAfterError = true; backup.ExpirationDate = DateTime.Now.AddDays(3); backup.LogTruncation = BackupTruncateLogType.Truncate; backup.SqlBackup(sqlServer);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)