2

I have to check programmatically if the SQL Server service needs restarting after series of changes in configuration.

Is there any indicator (e.g. in the system registry) that allows to obtain this information?

1 Answer 1

3

You can check for differences between value_in_use and value in sys.configurations for non dynamic changes.

Select * from sys.configurations
where value <> value_in_use and is_dynamic=0

to check for a changed logginmode

declare @tab table (name varchar(max),value varchar(max))
insert into @tab EXEC master.sys.xp_loginconfig 'login mode'
insert into @tab
SELECT 'current',CASE SERVERPROPERTY('IsIntegratedSecurityOnly')   
WHEN 1 THEN 'Windows NT Authentication'   
WHEN 0 THEN 'Mixed'   
END 

Select
CAST(
Case when (Select value from @tab where name='login mode')<>(Select value from @tab where name='current') 
then 1 else 0 end as bit) as loginconfig_changed 
2
  • That would be great solution if I wouldn't have to check if server authentication mode has changed :) Unfortunatelly that property isn't accessible through the sys.configurations view...
    – Rav
    Commented May 14, 2013 at 12:13
  • @Rav did an edit
    – bummi
    Commented May 14, 2013 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.