• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Automatically Truncate MS SQL Log Files?

eugenevdm

Regular Pleskian
How can I automatically truncate the MS SQL log files on all our Plesk servers? The problem is these files grow infinitely and then client moan because they get traffic warning.

Ideally I want to put a limit on this or automatically truncate them on a regular basis. We have quite a few servers so automation is essential. Maybe there is some default I can change?

For now I have to manually log in to the server and do this:
declare @dbname nvarchar(255)
set @dbname = 'db_name'
backup log @dbname with truncate_only
DBCC SHRINKDATABASE (@dbname, 0)
 
Just a minor update. Plesk allows log files to grow to 2 GB by default on MS-SQL.

On SQL 2008 you have to do:

Code:
declare @dbname nvarchar(255)
set @dbname = 'bigboysdb'
backup log @dbname to disk='NUL'
DBCC SHRINKDATABASE (@dbname, 0)
 
Back
Top