After SQL server log transfer is configured, the SQL server log is very large because the backup database is large and the time is frequent. For example:
Because we already have log shipping monitoring, this backup information is basically useless to us. Is there any way to make the Information Department appear in the database error log? The answer is trace flag.3226
The following content is from msdn:
3226 |
By default, every successful backup operation adds an entry in the SQL Server Error Log and in the system event log. if you create very frequent log backups, these success messages accumulate quickly, resulting in huge error logs in which finding other messages Is problematic. With this trace flag, you can suppress these log entries. This is useful if you are running frequent log backups and if none of your scripts depend on those entries. |
Enable trace flag on my Database Server3226, The successful backup information in the error log is no longer displayed:
DBCC traceon (3226,-1)
Go
Backup database dbatodisk = 'd: \ MSSQL \ DBA. Bak --- Perform three full backups
Go 3
Backup log dbatodisk = 'd: \ MSSQL \ dba_log.trn '-- perform four log backups.
Go 4
Sp_readerrorlog -- view the SQL Server Error Log
You can also add:
-T 3226
If you only want to affect the current session, use the following command:
DBCC traceon (3226)