shrinking log files after full database backup
stupy1
Posts: 7
Hi,
When we used to use standard sql server maintenance plans to backup our databases the jobs would shrink the log files after a full backup. I don't see this happening in SQL Backup. Am I missing this feature or has it just not been included yet?
Otherwise, I will create a separate job to shrink the logs.
thanks,
Justin
ps-love the software
When we used to use standard sql server maintenance plans to backup our databases the jobs would shrink the log files after a full backup. I don't see this happening in SQL Backup. Am I missing this feature or has it just not been included yet?
Otherwise, I will create a separate job to shrink the logs.
thanks,
Justin
ps-love the software
Comments
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
There is an auto-shrink property that you can set on the database properties, but there are a number of reasons why your logs still wouldn't shrink.
Microsoft do provide a method to shrink logs with the DBCC SHRINKFILE command:
http://msdn.microsoft.com/library/defau ... c_8b51.asp
Do you have plans to include a shrinking feature in any new version?
I think this would be very helpful to a lot of DBAs out there by not having to write our own little jobs for this. Shrinking a log file is a natural next step after a full database backup.
The syntax for a trx log backup is similar to the T-SQL syntax e.g.
execute master..sqlbackup '-sql "BACKUP LOG pubs TO DISK = [G:\Backups\pubs\<AUTO>]" '
You could also the trx logs of multiple databases e.g.
execute master..sqlbackup '-sql "BACKUP LOGS [northwind, pubs] TO DISK = [G:\Backups\<database>\<AUTO>]" '
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Are we saying that after eitehr a full DB backup and/or after a trx log backup, the trx logs are NOT truncated ?
If so this seems a pretty basic piece of functionality that SQL Backup lacks. I mean, as a DB operator, I am accustomed to log maintenance being taken care of by the backup procedure. Do we now need to create yet another job to do log cleanup ?
If your definition of truncation is 'shrink the transaction log files after a trx log backup', then no, neither SQL Server nor SQL Backup performs this automatically. The rationale is because if the trx log file grows to 'x' size, it can be expected to grow again to 'x' size even if you shrink it after a backup.
See for a discussion on this.
If enough users ask for an post-backup shrinkfile option, we would consider adding it in version 5.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8