Comprehensive data protection for all workloads
Post Reply
MAA
Expert
Posts: 101
Liked: 3 times
Joined: Apr 27, 2013 12:10 pm
Contact:

Please add to Statistics/Report a little more information about SQL log truncating

Post by MAA »

Hello,
Please add to Statistics/Report a little more information about SQL log truncating:
file name, size before, size after
PetrM
Veeam Software
Posts: 3264
Liked: 528 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: Please add to Statistics/Report a little more information about SQL log truncating

Post by PetrM »

Hello,

Could you please clarify why do you need to have this information in statistics? The log file size will not be changed after VM or log backup.

Thanks!
MAA
Expert
Posts: 101
Liked: 3 times
Joined: Apr 27, 2013 12:10 pm
Contact:

Re: Please add to Statistics/Report a little more information about SQL log truncating

Post by MAA »

I thought that the log after truncating is also shrinking...
can you add such a feature in the next versions?
(I think that in 2022 you don't have to worry about log fragmentation, since all databases switched to SSD a long time ago)
PetrM
Veeam Software
Posts: 3264
Liked: 528 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: Please add to Statistics/Report a little more information about SQL log truncating

Post by PetrM »

When the log file is truncated, the truncated space will be freed up and become available for reuse. But the file size will not be decreased, as the truncated space will not be deallocated. Truncate and shrink are two different operations. So far we have no plans to add such a feature on our roadmap but we can reconsider it as long as we have enough similar requests.

Thanks!
MAA
Expert
Posts: 101
Liked: 3 times
Joined: Apr 27, 2013 12:10 pm
Contact:

Re: Please add to Statistics/Report a little more information about SQL log truncating

Post by MAA » 1 person likes this post

such requests have existed for a long time: veeam-backup-replication-f2/feature-req ... 17018.html
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Please add to Statistics/Report a little more information about SQL log truncating

Post by Mildur » 1 person likes this post

You could leverage a script to run after the backup job is done to shrink the sql truncation logs.

Or a daily shrink script with the windows task scheduler or sql jobs.

That should be easy to script.
DBCC SHRINKFILE
Product Management Analyst @ Veeam Software
MAA
Expert
Posts: 101
Liked: 3 times
Joined: Apr 27, 2013 12:10 pm
Contact:

Re: Please add to Statistics/Report a little more information about SQL log truncating

Post by MAA »

>>You could leverage a script to run after the backup job is done to shrink the sql truncation logs.
Backup job has multiple SQL servers with many databases on each.
I am not a database administrator and I do not know the SQL language.
can you show a script that shrink the logs of all databases on all servers?

(in my opinion, it is easier for you to add a shrink option after truncation to B&R)
sasilik
Expert
Posts: 104
Liked: 13 times
Joined: Jun 12, 2014 11:01 am
Full Name: Markko Meriniit
Contact:

Re: Please add to Statistics/Report a little more information about SQL log truncating

Post by sasilik » 2 people like this post

I don't think that adding such an option to a SQL backup is a good idea. Little reading why shrinking a log file is not a good idea https://www.sqlshack.com/sql-server-tra ... practices/ and https://docs.microsoft.com/en-us/sql/re ... rver-ver15
Maybe you should get some SQL database management courses if there are no actual DB admins because managing SQL backups and log files and so on is usually their work.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 103 guests