I have multiple databases which are constantly growing. So from time to time, I truncate the log table and shrink the biggest databases. For the biggest one (>40gb) it takes quiete some time.
So I read about the option to have auto_shrink on , which periodicly shrinks the db's which have some free space.
I never tried that and I first want to hear some opinions on that. How often does the shrink happen with that opion on ? Will it eat alot memory or cpu ?
according to this page it's running in the background. Of course it does, butthey dont answer the needed question. How often and how much memory does it take.shrink db's Also, if a 100gb Database has 1 gb free, please don't shrink it....if it takes ages... what criteria does it take ? more than 10% free space? Btw. I am not a professional yet, just learning.
Auto shrink is evil.
You shouldn't be manually truncating the log files - if they're growing constantly then that's an indication that the database is using the FULL recovery model and you're not backing up the logs.
Depending on your recovery requirements, either start doing regular transaction log backups to keep the log file size down, or switch to SIMPLE.