Hi @jose de jesus ,
Please refer to this MS document: Shrink a database Consider the following information when you plan to shrink a database:
- A shrink operation is most effective after an operation that creates a large amount of unused storage space, such as a large DELETE statement, truncate table, or a drop table operation.
- Most databases require some free space to be available for regular day-to-day operations. If you shrink a database repeatedly and notice that the database size grows again, this indicates that the free space is required for regular operations. In these cases, repeatedly shrinking the database is a wasted operation. Autogrow events necessary to grow the database file(s) hinder performance.
- A shrink operation does not preserve the fragmentation state of indexes in the database, and generally increases fragmentation to a degree. This is another reason not to repeatedly shrink the database.
- Unless you have a specific requirement, do not set the AUTO_SHRINK database option to ON.
If shrinkage makes fragmentation increase, you need to rebuild the index to reduce fragmentation. Sometimes shrinkage doesn't solve the underlying problem, and you may face the problem of shrinking and then growing. Another thing is that if you are in full mode, you need to take regular backups to truncate the logs and prevent them from growing and running out of space.
Best regards, Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.