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?

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 
  • 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 May 14 '13 at 12:13
  • @Rav did an edit – bummi May 14 '13 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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