How can I drop a SqlServer Backup Device using SMO in C#?
- by C-Pound Guru
I can drop a SqlServer Backup Device using SQL-DMO using the following pseudo-code:
SQLDMO.SQLServer2 server = New SQLDMO.SQLServer2();
server.Connect("myserver");
server.BackupDevices.Remove("mybackupdevice");
File.Delete("mybackupdevicephysicallocation");
SMO.Server.BackupDevices does not appear to have a Remove() method, so how can I drop a BackupDevice using SMO?