Backup problem
-
Hi all I got one error when i am trying to get backup of database. my error is:An exception of type 'Microsoft.SqlServer.Management.Smo.FailedOperationException' occurred in Microsoft.SqlServer.Smo.dll but was not handled in user code The medium on device 'd:\' expires on Aug 21 2009 6:44:24:000PM and cannot be overwritten. BACKUP DATABASE is terminating abnormally. my code is: ServerConnection connection = new ServerConnection(con); Server sqlServer = new Server(connection); sqlBackup.SqlBackup(sqlServer); //i got error on this line con is object of sqlconnection Thanks
-
Hi all I got one error when i am trying to get backup of database. my error is:An exception of type 'Microsoft.SqlServer.Management.Smo.FailedOperationException' occurred in Microsoft.SqlServer.Smo.dll but was not handled in user code The medium on device 'd:\' expires on Aug 21 2009 6:44:24:000PM and cannot be overwritten. BACKUP DATABASE is terminating abnormally. my code is: ServerConnection connection = new ServerConnection(con); Server sqlServer = new Server(connection); sqlBackup.SqlBackup(sqlServer); //i got error on this line con is object of sqlconnection Thanks
You are trying to overwrite a new backup to existing backup file for which expiration date is set.. and this is not advisable. You can try using init skip parameters in your backup command which will initialise the backup file. Firstly existing backup data will be removed and so your data expiration date check would be skipped. Google for init skip params. Best Of Luck.