Home > database >  Questions about by TSQL finish pending delete bak files
Questions about by TSQL finish pending delete bak files

Time:04-22

requirement:
1. Perform by a key script automatically backup the database to drive
2. The output in the result window after a successful backup details of the backup file
3.24 hours after automatically deleted bak files
4.123 steps must be completed in the same session window to execute a script file,
difficulty: waitfor implementation steps 3 can, but will result in step 2 will be returned after step 3, now I can think of is to build a homework to do, and then delete the homework, but it seems that homework can't delete itself, don't know what bosses have a good way to achieve?

CodePudding user response:

Timing plan assignment, learn about, SSMS with this feature, it is not called to complete in a session form, is to be a timer, the scope of the condition of specified time, to perform a backup and delete operation,

CodePudding user response:

https://blog.csdn.net/yenange/article/details/51424523

It is ok to use this,
But it don't delete this job, it is not necessary,

According to the conditions of detected meets the requirements of the file, it is ok to delete,

CodePudding user response:

reference 1st floor morliz son hin reply:
timing plan assignment, learn about, SSMS with this feature, it is not called to complete in a session form, is to be a timer, the scope of the condition of specified time, to perform a backup and delete operation,

I don't know the homework, the reason is that homework doesn't seem to delete itself, if you suggested that I don't delete, it will appear to retain enough time was homework deleted, such as setting 0 point automatically delete, backup and 23 points at 9 backup bak is a big gap between the retention time,

CodePudding user response:

reference cat raccoon dog ga response: 3/f
I know homework, no reason is that homework can't seem to delete itself, if you suggested that I don't delete, it will appear to retain enough time was homework deleted, such as setting 0 point automatically delete, backup and 23 points at 9 backup bak is a big gap between the retention time,

Generally speaking, backup point, keep the time range, is calculated on the day, you are calculated according to subtotal removed?

CodePudding user response:

reference 4 floor morliz son hin reply:
Quote: refer to 3rd floor cat raccoon dog ga response:

I don't know the homework, the reason is that homework doesn't seem to delete itself, if you suggested that I don't delete, it will appear to retain enough time was homework deleted, such as setting 0 point automatically delete, backup and 23 points at 9 backup bak is a big gap between the retention time,

Generally speaking, backup point, keep the time range, is calculated on the day, you are calculated according to subtotal removed?

Is, the ideal situation is reserved to upload after the cloud disk is deleted, and backup time is random, backups may evening may morning, so can't use homework regularly,

CodePudding user response:

"2. Backup output in the result window after a successful backup file details"
--> Can you tell me what is required to include details of the backup file information?
  • Related