Home > Database > Mysql Tutorial > Questions about setting up the registry in SQL

Questions about setting up the registry in SQL

一个新手
Release: 2017-10-20 11:27:21
Original
2304 people have browsed it

## I wrote an article before Blog post"MS SQL Logging Management", which introduces how to set up the error log of SQL Server The maximum number of archives, if set in the UI interface of SSMS, can be set from "Management" -> "SQL Server Logs" Right-click option"Configure" Set the number of error logs as follows:


Questions about setting up the registry in SQL

If you use script settings, as shown below, this script can also modify the maximum number of error logs


##

USE [master];GO EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE',
Copy after login
    N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', REG_DWORD,
Copy after login
    10;
Copy after login
GO
Copy after login

Take SQL Server 2008 as an example (default instance), the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer does not have this parameter NumErrorLogs, this parameter is actually located in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQLServer below

Take SQL Server 2014 as an example (default instance), the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer does not have this parameter NumErrorLogs, this parameter is actually located in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQLServer below

##Of course if it is Named instances and registry paths are still different, but the above stored procedures can modify the registry using the above parameters (same parameters)NumErrorLogs Parameters, was originally # The value combination of ##N'HKEY_LOCAL_MACHINE' and N'Software\Microsoft\MSSQLServer\MSSQLServer' is the specific path of the parameter in the registry, but actual verification found that this is not the case. In addition, due to ##master.sys.xp_instanc e_regwrite is a stored procedure without documentation, so I don’t know how it is processed internally. That is to say, I don’t know whether it is converted internally or for other reasons. This is a very confusing and puzzling question.

# #

Questions about setting up the registry in SQL

Questions about setting up the registry in SQL

The above is the detailed content of Questions about setting up the registry in SQL. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template