Closed

Closed due to inactivity. Received 17 votes with last vote on 21 Oct 2019.

Shrink database during nightly DB maintenance

During a troubleshooting session, a SW technician informed me that using the using the DB Shrink (aka DB Compact) feature is SQL Server is not recommended by SolarWinds.  Supposedly, whenever this is done, it leads to fragmentation issues.  The problem with that advice is that the DB Maintenance applet does not seem to perform any kinds of shrinking of the database.  So, I suggest for the SW developers to tweak the DB Maintenance applet so it will perform its own version of DB compacting during the process. 

Perhaps some of you have other ways to deal with this concern -- I would very much like to learn from you.  Otherwise, please consider voting for this idea.  Many thanks!

  • This is an older Feature Request Post, I'm aware, but I came across it and figured I'd add my two cents to the conversation:

    If you search the internet for info about SQL Server index fragmentation you will see a LOT of conflicting opinions.  The consensus when it comes to index fragmentation being bad or OK seems to be "It depends" though. Check this article out right here for more info: https://www.brentozar.com/archive/2012/08/sql-server-index-fragmentation/

    Mostly it boils down to it probably not being as big of a deal as most people think.  There are a lot of ways to optimize your SQL Server database and index defragmentation is just one of many pieces.

  • I reached out to our DB folks and they created jobs for this.  However, I still see a lot of messages in the swdebugMaintance.log file warning about very high fragmentation for many of our tables.  I contacted SW tech support and they agreed that there is "too much fragmentation" in our database.  However, our DB folks check it out several times and they keep telling me that this is normal.  So, who is right and why does the nightly database maintenance log shows so many warnings?  Something seems a bit off here... emoticons_confused.png

  • I run a very large deployment and to be honest I'm weak on DB stuff. I just don't see size as a problem much. Our DB does have a fragmentation issue. The built in tool has a defragment function which worked for a while but then stopped working right as we continued to grow. We had to write custom scripts to run reorg and reindex. Those take a LONG time to run but doing it overnight has not been an issue.