Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

Global Configuration Settings Expand / Collapse
Author
Message
Posted Thursday, August 29, 2013 9:14 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 12:18 PM
Points: 413, Visits: 879
Comments posted to this topic are about the item Global Configuration Settings
Post #1489985
Posted Thursday, August 29, 2013 9:19 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, January 20, 2016 3:52 PM
Points: 1,818, Visits: 836
Interesting question,but what would be the use of this ??

Hope this helps...

Ford Fairlane
Rock and Roll Detective





Post #1489987
Posted Thursday, August 29, 2013 9:25 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 12:18 PM
Points: 413, Visits: 879
Lesson is use the complete name. For example, rather than using "advanced options" use "show advanced options". If MS ever introduces "hide advanced options" then you may need to rewrite some code. Essentially, just be aware of how it works. Just an FYI. :)

Just curious, did you get it right or wrong?
Post #1489989
Posted Thursday, August 29, 2013 9:32 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, January 20, 2016 3:52 PM
Points: 1,818, Visits: 836
Sean Smith-776614 (8/29/2013)
Lesson is use the complete name. For example, rather than using "advanced options" use "show advanced options". If MS ever introduces "hide advanced options" then you may need to rewrite some code. Essentially, just be aware of how it works. Just an FYI. :)

Just curious, did you get it right or wrong?



Fair enough....

I got it right ... but just couldn't think of a really practically use but maybe its the head cold creeping....


Hope this helps...

Ford Fairlane
Rock and Roll Detective





Post #1489991
Posted Thursday, August 29, 2013 9:35 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 12:18 PM
Points: 413, Visits: 879
As I said, it's just more of an FYI as to how it works.
Post #1489993
Posted Friday, August 30, 2013 12:56 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 7:35 AM
Points: 15,143, Visits: 13,031
Interesting question to close the week, thanks.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1490011
Posted Friday, August 30, 2013 2:02 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:35 AM
Points: 5,024, Visits: 6,733
Interesting question, thanks Sean

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #1490022
Posted Friday, August 30, 2013 2:25 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 1:16 AM
Points: 3,142, Visits: 3,012
Here is the code from sp_configure:
	-- Use @configname and try to find the right option.
-- If there isn't just one, print appropriate diagnostics and return.
select @configcount = count(*)
from sys.configurations
where lower(name) like '%' + @configname + '%'
and (is_advanced = 0 or @show_advance = 1)

-- If no option, print an error message.
if @configcount = 0
begin
raiserror (15123,-1,-1,@confignameIn)
return (1)
end

-- If more than one option like @configname, show the duplicates and return.
if @configcount > 1
begin
raiserror (15124,-1,-1,@confignameIn)
print ' '

select duplicate_options = name
from sys.configurations
where lower(name) like '%' + @configname + '%'
and (is_advanced = 0 or @show_advance = 1)

return (1)
end
else
-- There must be exactly one, so get the full name.
select @configname = name
from sys.configurations
where lower(name) like '%' + @configname + '%'
and (is_advanced = 0 or @show_advance = 1)

Post #1490026
Posted Friday, August 30, 2013 2:36 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 1:16 AM
Points: 3,142, Visits: 3,012
Here is sp_configure with a simple optimization:
	-- Use @configname and try to find the right option.
-- If there isn't just one, print appropriate diagnostics and return.
select @configcount = count(*)
,@confignameFullName = MAX(name)
from sys.configurations
where lower(name) like '%' + @configname + '%'
and (is_advanced = 0 or @show_advance = 1)

-- If no option, print an error message.
if @configcount = 0
begin
raiserror (15123,-1,-1,@confignameIn)
return (1)
end

-- If more than one option like @configname, show the duplicates and return.
if @configcount > 1
begin
raiserror (15124,-1,-1,@confignameIn)
print ' '

select duplicate_options = name
from sys.configurations
where lower(name) like '%' + @configname + '%'
and (is_advanced = 0 or @show_advance = 1)

return (1)
end
else
-- There must be exactly one, so get the full name.
SET @configname = @confignameFullName

/*
select @configname = name
from sys.configurations
where lower(name) like '%' + @configname + '%'
and (is_advanced = 0 or @show_advance = 1)
*/


Post #1490027
Posted Friday, August 30, 2013 2:37 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, May 5, 2015 4:11 AM
Points: 443, Visits: 448
"The SQL Server Database Engine recognizes any unique string that is part of the configuration name."

Wow, I did not know that. Good question, I always like it when I learn something new.
Post #1490028
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse