简体   繁体   中英

Delete all files in /var/opt/mssql/log everyday?

I want to delete it regularly every day, is there a problem with my database if I delete it every day?

Because if left unchecked it will take up very large space see this pic below (I use ubuntu server):

日志图片

Yes, it is safe to delete it.

This directory contains only logs and does not hold the main data of your database.

you can configure the number of error logs for your SQL Server instance

(default behavior in SQL Server on Linux is to keep 128 error logs)

if you want to retain 6 error logs in the LOG folder, you will configure it as follows:

sudo /opt/mssql/bin/mssql-conf set errorlog.numerrorlogs 6

https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-ver15#errorlogdir

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM