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


Global Configuration Settings


Global Configuration Settings

Author
Message
Andrew Watson-478275
Andrew Watson-478275
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1763 Visits: 2704
Interesting (although I can't imagine why it's been done that way).

It would have been nice if you had used one from the top of the list of options (maybe "uck") rather than the very last one, to save us having to trawl the entire list to see if any of them contained "dsh" (although with hindsight, it is a fairly obvious one).
Danny Ocean
Danny Ocean
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1638 Visits: 1549
Stewart "Arturius" Campbell (8/30/2013)
Interesting question, thanks Sean

+1 :-)

Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
www.GrowWithSql.com
paul.knibbs
paul.knibbs
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2583 Visits: 6232
Wow, did not expect that at all--why on earth would Microsoft make a system-level configuration procedure allow any old random garbage to work so long as it happens to be contained as a string in one of the real configuration names? Blink
psingla
psingla
SSC Eights!
SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)

Group: General Forum Members
Points: 884 Visits: 1249
alex.d.garland (8/30/2013)
"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.

+1

Pramod
SQL Server DBA | MCSE SQL Server 2012/2014

in.linkedin.com/in/pramodsingla/
http://pramodsingla.wordpress.com/
Hugo Kornelis
Hugo Kornelis
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11108 Visits: 12002
paul.knibbs (8/30/2013)
Wow, did not expect that at all--why on earth would Microsoft make a system-level configuration procedure allow any old random garbage to work so long as it happens to be contained as a string in one of the real configuration names? Blink

Probably because someone thought it would be useful to allow people to type only 'show advanced' (or even 'show adv') instead of the full 'show advanced options'. And just 'ad hoc' instead of 'optimize for ad hoc workloads'. And they never really considered the "less intuitive" uses such as in this question.

I do agree with Sean's warning though. It's not like you have to type commands like this many times per day, and I'd rather type the full option name and be safe from future surprises.


(BTW, I got the question correct, but only because I figured that there has to be a reason for this question. I had at first not even recogised dsh as a substring of the option name; to me it was just a random string of three letters).


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Tom Thomson
Tom Thomson
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14417 Visits: 12215
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. Smile

Just curious, did you get it right or wrong?

Why would the server think that 'ow a' was a substring of 'hide advanced options'? Hehe

Tom

Tom Thomson
Tom Thomson
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14417 Visits: 12215
An nice amusing question that demonstrates an unfortunate feature of SQL - using contractions is not a habit I would like to get into. so a good question about something that people may be unaware of. I hope people don't take away the lesson that this is a good thing to use, though.

However, the correct answer is wrong - the real answer is "it depends". Since security is a useful thing to have, I normally log into servers as a non-member of local administrators; if I then connect to SQL Server, I don't get SA privileges, because local admins (for machines not in a domain) or domain or enterprise admins (for machines in a domain) get SA privileges.

So whether the first call works or not depends on whether I remembered to log in as an admin user because I was going to try to switch xp_cmdshell on, or (more likely) remembered to leave my current unprivileged SSMS and start it up again as an admin user.

Of course the use of tick boxes indicates that more than one option is to be chosen, which gives the game away as only one of the three options could be true if I had connected without the required privileges.

Tom

Jeff.MSSqlSage
Jeff.MSSqlSage
Old Hand
Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)

Group: General Forum Members
Points: 391 Visits: 274
L' Eomot Inversé (8/30/2013)
An nice amusing question that demonstrates an unfortunate feature of SQL - using contractions is not a habit I would like to get into. so a good question about something that people may be unaware of. I hope people don't take away the lesson that this is a good thing to use, though.

However, the correct answer is wrong - the real answer is "it depends". Since security is a useful thing to have, I normally log into servers as a non-member of local administrators; if I then connect to SQL Server, I don't get SA privileges, because local admins (for machines not in a domain) or domain or enterprise admins (for machines in a domain) get SA privileges.

So whether the first call works or not depends on whether I remembered to log in as an admin user because I was going to try to switch xp_cmdshell on, or (more likely) remembered to leave my current unprivileged SSMS and start it up again as an admin user.

Of course the use of tick boxes indicates that more than one option is to be chosen, which gives the game away as only one of the three options could be true if I had connected without the required privileges.


I think you can always make this argument, though.

"What if the SQL Server had caught fire moments earlier ? Then none of the commands would work."
Sean Smith (SSC)
Sean Smith (SSC)
Right there with Babe
Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)

Group: General Forum Members
Points: 739 Visits: 990
Thanks for all the feedback everyone. Again, just more of an FYI about the behavior of the sp. It just caught me off gaurd when I realized it worked this way and all I thought was "Wow, this is a BAD design." :p
Mike Hays
Mike Hays
Right there with Babe
Right there with Babe (771 reputation)Right there with Babe (771 reputation)Right there with Babe (771 reputation)Right there with Babe (771 reputation)Right there with Babe (771 reputation)Right there with Babe (771 reputation)Right there with Babe (771 reputation)Right there with Babe (771 reputation)

Group: General Forum Members
Points: 771 Visits: 764
Well, I learned something. Thanks!
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