1
votes

I have an SSIS package that handles daily db backup and deletes backups with the extension .bak if they are more than two days old. We have a new server so have brought the SSIS package across, but we forgot to specify the file extension .bak for deletion so the backups aren't being deleted.

I need to change the package to specify the file extension so the backups get deleted, but am not sure how to do this. If I open SSMS, there is nothing listed under integration services catalogs, but I can see the SQL Server Agent job that runs the package. When I log into integration services in SSMS, I can see the package in stored packages > msdb. Am I able to right click on the package in stored packages > msdb when connected to integration services in SSMS, click export and save a .dtsx file. I can open this and make the change in VS shell 2010. Do I resave the package with the same name and then import it in integration services in SSMS and let it overwrite the existing one? Are there other issues with deployment here?

Cheers,

2

2 Answers

0
votes

You got the basics, I would make sure you have backups. But what you are doing can be done easily with Maintenance Plans, they just create SSIS packages under the covers, but have task driven wizards for backups, backup cleanup, index reorgs, etc., with a tie to SQL Agent for scheduling them.

0
votes

When you want to delete the .BAK file, We can use a 'Foreach loop task' to scan the file location.

enter image description here

I think you can delete the file by using a file system task in the for-each task.

enter image description here

enter image description here