How to make the backup information of log shipping fail to appear in SQL Server Error Log?

Source: Internet
Author: User
Tags server error log

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)

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.