SQL Server startup parameters -d, -l, -e which store the information about the master database data file, log file and ERRORLOG locations respectively are stored under the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.X\MSSQLServer\Parameters
However, if you need to find out the startup parameters without using the regedit snap-in (default and any extra ones added), you can use the following script:
<<SCRIPT>>
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Microsoft\SqlServer\ComputerManagement") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM SqlServiceAdvancedProperty WHERE SqlServiceType = 1 and PropertyName = 'STARTUPPARAMETERS'",,48) For Each objItem in colItems Wscript.Echo "ServiceName: " & objItem.ServiceName Wscript.Echo "PropertyName: " & objItem.PropertyName Wscript.Echo "PropertyStrValue: " & objItem.PropertyStrValue Next
<</SCRIPT>
Pingback: Wiki: SQL Database Engine Startup Failures « TroubleshootingSQL
Pingback: Wiki: SQL Database Engine Startup Failures for Clusters « TroubleshootingSQL
Pingback: Azure Storage and SQL Server – Part 7 | TroubleshootingSQL