In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to set the maximum number of archived error logs in SQL Server. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
How to set the maximum number of archived error logs for SQL Server. If you set it in SSMS's UI interface, you can set the number of error logs from "Management"-> "SQL Server Logs" right-click option "Configure", as shown below:
If you use the script settings in, as shown below, this script can also modify the maximum number of error logs
USE [master]; GO EXEC xp_instance_regwrite Native HKEY localized machine'
Undefinedundefined
N'Software\ Microsoft\ MSSQLServer\ MSSQLServer', NumErrorLogsgiving, REG_DWORD
Undefinedundefined
10
Undefinedundefined
GO
Undefined
Take SQLServer 2008 as an example (default instance). This parameter NumErrorLogs is not available in the registry HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ MSSQLServer\ MSSQLServer. It is actually located under HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Microsoft SQLServer\ MSSQL10_50.MSSQLSERVER\ MSSQLServer.
Take SQLServer 2014 as an example (default instance). This parameter NumErrorLogs is not available in the registry HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ MSSQLServer\ MSSQLServer. It is actually located under HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Microsoft SQLServer\ MSSQL12.MSSQLSERVER\ MSSQLServer.
Of course, if it is a named instance, the registry path is still different, but the above stored procedure can be modified to the registry NumErrorLogs parameter using the above parameters (the same parameter). The combination of values originally named HKEYLOCALCALINEMACHINE' and N'Software\ Microsoft\ MSSQLServer\ MSSQLServer' is the specific path of the parameter in the registry, but the actual verification shows that this is not the case. In addition, because master.sys.xp_instance_regwrite is a stored procedure without documentation, I don't know how it is handled internally, that is, whether it has been transformed internally or for other reasons. This is a rather confusing and puzzling question.
Thank you for reading! This is the end of this article on "how to set the maximum number of error logs in SQL Server". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.