SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL server startup parameters


SQL server startup parameters

Author
Message
Robin35
Robin35
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1749 Visits: 1290
Hi,

i'm trying to find the startup parameters for sql server 2008 and 2005 using t-sql...
for sql 2008 R2 i was able to get the information using the below script......
SELECT * FROM sys.dm_server_registry

Please let me know if there is any t-sql script to find the start up parameters....i would like to avoid the gui...

Thanks in advance...
Robert klimes
Robert klimes
SSCertifiable
SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)

Group: General Forum Members
Points: 5005 Visits: 3464
you can use xp_instance_regread to find the startup parameters on 2005 and 2008. the key path would have to chnage for named instances.

DECLARE  @startup VARCHAR(255)
DECLARE @arg VARCHAR(10)
DECLARE @i INT
SET @i = 0
SET @startup = ''
WHILE(@startup IS NOT NULL)
BEGIN
SET @arg = 'SQLArg'+CAST(@i AS VARCHAR(2))
SET @startup = NULL
EXEC xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer\Parameters', @arg, @startup OUTPUT
SELECT @startup
SET @i= @i+1
END



Bob
-----------------------------------------------------------------------------
How to post to get the best help
Robin35
Robin35
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1749 Visits: 1290
Thanks Bob for the response. i'm able to see the result....can i see all the startup parameters using this script ?
with this script...
SELECT value_name,value_data FROM sys.dm_server_registry
i'm able to see all the values....
please let me know

thanks in advance
Robert klimes
Robert klimes
SSCertifiable
SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)

Group: General Forum Members
Points: 5005 Visits: 3464
the query you provided will show you all registry values, not just startup parameters. you would need to add where clause to return startup parameters only.

SELECT value_name,value_data FROM sys.dm_server_registry
WHERE registry_key = 'HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL11.EXPRESS\MSSQLServer\Parameters'



you can run my provided code on 2008 R2 and compare it to the results from sys.dm_server_registry. it should be returning all the startup parameters.

Bob
-----------------------------------------------------------------------------
How to post to get the best help
Robin35
Robin35
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1749 Visits: 1290
Thanks a lot bob.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search