Over time, some clients ASYNC tables in their MSCRM (Microsoft Dynamics CRM) database grow very large. We perform the steps in KB968520 to cleanup the table. Afterwards, a large amount of free space is left in the database which we want to release back to the OS to use. For some on-premise clients we manually Shrink the Database at the time of the ASYNC table cleanup. For clients in a hosted environment, we need to schedule it outside of business hours because of the I/O activity slamming the system.
We use a Maintenance Plan, customize the "Shrink Database Task" and tell it to "Return freed space to operating system". For example, most recently, a plan setup had 20GB of free space in the DB to release - it appears the plan kicked off on-time - ran for 18 seconds - threw no errors - and completed. The database still has 20GB of free space - so it didn't actually work.
Now, when we manually run a shrink we first go to Tasks > Shrink > Files. That takes a few seconds. If that doesn't release the space we go to Tasks > Shrink > Database. That will free it up after running for awhile.
Any ideas why the Maintenance Plans are not working? Are they trying to do the "File" shrink instead of the "Database" shrink. Seeing in the History that the Maintenance Plan only ran for 18 seconds indicates that might be the case?
Thanks a lot for any support you can provide! I hope it can help someone else as well.