|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, February 21, 2013 2:41 AM
Points: 271,
Visits: 97
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 2,579,
Visits: 1,537
|
|
I think the question and answers here could have been worded better. sp_configure 'clr enabled', 1 actually enables clr while sp_configure 'clr enabled', 1 GO RECONFIGURE GO, in theory enables and installs the feature. Running sp_configure 'clr enabled', 1 GO RECONFIGURE GO actually returns a syntax error because the GO statement cannot be run on the same line with a system stored proc and RECONFIGRE has to be run in a separate batch.
Technically to just enable CLR, answer option 3 is correct.
A better question might have been "How do you enable and install the CLR option in SQL Server 2005?".
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Tuesday, May 31, 2011 2:32 PM
Points: 491,
Visits: 221
|
|
Kenneth, I can understand that point. I am not going to say that you are wrong but I will offer my interpretation of the question and how I answered.
I took enabled to mean 'activated'. Answer 3 will merely set the configuration but it's not technically active (enabled) until you execute the reconfigure statement or restart the server.
Following that logic I chose answer 1. The question does leave it up to your interpretation of the word.
Cheers
|
|
|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: Today @ 3:30 PM
Points: 31,436,
Visits: 13,751
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 2,579,
Visits: 1,537
|
|
After looking the question over some more, I can see why the answers were written out the way they were. The GO statements were put in there to separate the pieces to be run and even though it cannot be executed exactly as it is written, it is overall correct and there isn't a better way to state it without writing "execute sp_configure... then execute RECONFIGURE". And it is true that configuring the option is not the same as enabling it since one could not use CLR until the reconfigure was performed.
Thanks,
Ken
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Yesterday @ 11:46 AM
Points: 507,
Visits: 875
|
|
Okay, being a newbie to the adminstration side of SQL Server, I have to ask!
Given that BOL says the following:
sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'clr enabled', 1; GO RECONFIGURE; GO
How do you determine that only the last 4 lines are necessary (as the answer to the question implies). What are the first 4 lines doing (okay, the "GO" isn't doing anything...)? BOL doesn't specify, it just gives you this code and then talks about what "sp_configure 'clr enabled', 1" does.
Here there be dragons...,
Steph Brown
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Tuesday, May 31, 2011 2:32 PM
Points: 491,
Visits: 221
|
|
Hi Steph,
Let's start with Reconfigure. The options we are setting here can be configured to be turned on. For example. If you execute: sp_configure 'show advanced options', 1; Then execute sp_configure you will see the the config_value is set to 1, however the run_value is not. Without the Reconfigure statement you will only be setting the config_value. To set the run_value you need to either execute the reconfigure statement or restart your server.
Knowing that let's look at the first line. sp_configure 'show advanced options', 1; This will set the config_value to show you more options when you run sp_configure. To enable it right now you can run the Reconfigure statement.
The GO statement signals the end of a batch. The next line: sp_configure 'clr enabled', 1; This will set the config_value for that option. Next, again, we run the reconfigure statement to enable the feature.
I hope this helps. :)
Cheers
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Yesterday @ 11:46 AM
Points: 507,
Visits: 875
|
|
Ah, that makes more sense. Sometimes BOL assumes we know more that we do! ;)
Here there be dragons...,
Steph Brown
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 10:02 AM
Points: 20,
Visits: 84
|
|
I think sp_configure 'clr enabled', 1 actually enables clr while sp_configure 'clr enabled', 1 GO RECONFIGURE GO, in theory enables and installs the feature.
Running sp_configure 'clr enabled', 1 GO RECONFIGURE GO actually returns a syntax error because the GO statement cannot be run on the same line with a system stored proc and RECONFIGRE has to be run in a separate batch.
Technically to just enable CLR, answer option 3 is correct.
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Tuesday, May 31, 2011 2:32 PM
Points: 491,
Visits: 221
|
|
Vishal, Are you just quoting Kenneth? I ask because you have copy/pasted most of his post. Please scroll up to refer to the other posts on this topic. Just setting the option without the Reconfigure statement does not mean it is enabled. However, your own thoughts are welcome, of course.
Cheers
|
|
|
|