Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Maintenance commands affect on log file / log file maintenance without log file backups

$
0
0
I am testing some maintenance tasks sql commands such as index rebuild, index reorg, update statistics and db integrity check on a SQL Server 2014 Database. This is a new non-production vendor database (DB Size 500 GBs, Log Size 25 GBs) which eventually will be created in production. Currently, it is in full recovery model and without log backups. The database has a whole lot of indexes. I am just trying to rebuild and reorganize all the indexes (that need it), in addition to trying to get an idea of how long these maintenance task will take and the space needed in the log file to complete these tasks/commands. I would like to execute these tasks manually (the first time) to gather the duration and space required information. Eventually, I would probably schedule a weekly job to perform this maintence.I ran the index rebuild task on the database and noticed that the log file grew by over 50 GBs. I killed the process and truncated and shrunk the log file back down. This led to the following questions:1. Does the index rebuild, index reorg, update statistics and db integrity check commands all use the log file?2. Does Indexs Reorg have less impact on log file then Index Rebuild?3. Should a truncate log and shrink log file be performed after these maintenance commands?4. Should a full database backup be performed after these maintenance commands? Or before the maintenance commands?I have read and understand that shrinking is not good for the database (could lead to more fragmentation and more data file growth when data is added) and I know about rebuilding indexes when fragmentation is GT 30% and reorganizing indexes when fragmentation is GT 5% and LE 30%. Since this is a non-production database maybe I should set the recovery model to simple, run the maintenance commands and leave the database in simple recovery model unless the vendor needs it in full recovery model for some unknown reason. 5. With the simple recovery model the log file should be reused in a circular manner and not grow during these maintenance tasks. Is this correct?Just looking for some thoughts and ideas. Thanks in advance.

Viewing all articles
Browse latest Browse all 6525

Trending Articles