cookie SQL (3/9/2015)
I would look at the active portions of the log 'DBCC LogInfo' , check that its viable to shrink or it will just fail.
The other thing not mentioned or in the script is VLF's, I have a similar script but check that its shrunk as expected and the VLF count at the end.
My other concern would be drive fragmentation for spinning disks.
Remember growing a log file is a blocking operation so be careful how much you shrink because your slowing the other processes down. Maybe you should manage the growth before your import and directly shrink it back after with some checks in place.
+1 to everything said above.
I understand the need to shrink any SQL Transaction Log file that has experienced ONE Temporary Over Growth.
I see the need to do something automated when disk space for the fast and near storage that log files should be deployed on is a premium, but only when multiple databases have to use this same storage area.
And only if there was something that would grow each log file back to where it was before these data imports start.
Your solution that runs every 15 minutes outside of the SSIS packages were this task should be seem illogical and dangerous.
At best I would imagine it would shrink a log file right before that log file would auto grow and slow down anything using that log file.
A log file that becomes a certain size every night does so because it needs to be that size to do the task at hand.
You are ALWAYS going to need that much disc space available and a Transaction Log of that size .
Creating something that runs every 15 minutes to Shrink any Tran Log because there are no active connections to the database is at best performance robbing not enhancing.
If you have a SSIS package that has a need for a large Transaction log when it runs then add tasks to that package or the SQL Agent Job that executes it to Grow and then Shrink the Tran log files that are affected.
I do admit this is an interesting temporary solution for your specific problem.
Just would feel better if the permanent problems that it creates and glosses over were detailed better in your article.