What registries does SQLServer write?

Source: Internet
Author: User
During SQL server startup, the startup information will be read from the Registry first. Sometimes, when SQL Server cannot be started, we need to modify the registry. But where is the SQL server information stored in the registry? From the Internet

During SQL server startup, the startup information will be read from the Registry first. Sometimes, when SQL Server cannot be started, we need to modify the registry. But where is the SQL server information stored in the registry? From the Internet

In fact, Microsoft added a new DMV in Versions later than 2008 R2 SP1 to query the configuration information and installation information in the Windows registry of the SQLServer instance. The US space returns a row for each registry entry, the U.S. space can return the available SQL Server service on the host or the network configuration value of the SQL Server instance ..

The following are two examples:


The following example returns the network configuration information of the current SQL Server instance.
SELECT registry_key, value_name, value_data FROM sys. dm_server_registry WHERE keyname LIKE n' % SuperSocketNetLib % ';

The following example shows the parameters that are passed to the SQL Server instance during startup.
SELECT registry_key, value_name, value_data FROM sys. dm_server_registry WHERE registry_key like n '% Parameters ';


Some explanations about the registry value:

ParameterOk To Set? Apparent Usage

AgentErrorLogFileYesPath where SqlAgent service puts its SQLAGENT. OUT log file.

AgentWorkingDirectoryYesPath where SqlAgent stores temporary files. Possibly also default path for job step log files.

BackupDirectoryYesPath where BACKUP and RESTORE place DISK = files by default.

CollationNoCollation specified at installation.

CurrentVersionNoSQL Server version (seems to be same as Version ).

DynamicPortsYesCurrent dynamic port number for All IPs. Set to empty string ''to disable.

EditionNoEdition of SQL Server installed, (e.g. Standard Edition, Enterprise Edition ).

ErrorLogYes-e followed by path where SQL Server writes ERRORLOG files.

Fulltextdefapatpathyespath where Full-Text catalog files are kept .(?)

MasterDataFileNo *-d followed by full path of master. mdf.

MasterLogFileNo *-l followed by full path of mastlog. mdf

PatchLevelNoAnother flavor of Version, though not as specific .(?)

PortYesStatic port number for All IPs.

RegisteredOwnerNoOwner specified at installation.

SQLBinRootNoFull path to the Binn directory.

SQLDataRootYesPath to the level above the Data directory where new databases are created.

SQLPathNoFull path to MSSQL level of installation.

SQLProgramDirNoFull path to level above MSSQL. n installation directory.

SerialNumberNoApparently, serial number of installation. Blank on my installations.

VersionNoSQL Server version (seems to be same as CurrentVersion ).

After knowing the meaning of these values, we can modify the authentication mode of SQL Server, and find the registry.

HKLM \ Software \ Microsoft SQLServer \ MSSQL.1 \ MSSQLServer \ LoginMode

Then, change the value from 1 to 2. After the website space is restarted, you can see that the authentication mode has been changed.


For more information, see sys. dm_server_registry (Transact-SQL)

This article is from the "follow SQL Server Technology" blog. Be sure to keep this source

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.