June 9, 2009 at 8:52 am
I have several trace flags and the "-g" parameter configured for a SQL instance. The startup-parameter line looks like this:
...;-T1204;-T1222;-g384
I know how to get the trace flags programmatically through DBCC TRACESTATUS, but what about "-g"?
We have a powershell script that goes through all our instances and records all these settings storing them in a network share, in case we need to reproduce them down the line.
Does anyone know how to retrieve this info for "-g"?
This is the flag for configuring the mem-to-leave area of memory:
http://msdn.microsoft.com/en-us/library/ms190737(SQL.90).aspx
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
June 9, 2009 at 10:10 am
This is how management studio gets the startup params, I use this to poll our server in ssis and save the data in case of DR
CREATE TABLE #TEMPTOAD ( Argument nvarchar(32), Value nvarchar(150) )
insert into #TEMPTOAD EXEC master..xp_instance_regenumvalues 'HKEY_LOCAL_MACHINE', 'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\Parameters'
SELECT * FROM #TEMPTOAD ORDER BY #TEMPTOAD.Argument
DROP TABLE #TEMPTOAD
Andrew
June 9, 2009 at 10:21 am
andrewkane17 (6/9/2009)
This is how management studio gets the startup params, I use this to poll our server in ssis and save the data in case of DRCREATE TABLE #TEMPTOAD ( Argument nvarchar(32), Value nvarchar(150) )
insert into #TEMPTOAD EXEC master..xp_instance_regenumvalues 'HKEY_LOCAL_MACHINE', 'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\Parameters'
SELECT * FROM #TEMPTOAD ORDER BY #TEMPTOAD.Argument
DROP TABLE #TEMPTOAD
Andrew
Thank you, this works beautifully!
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply