Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Server 2005 Expand / Collapse
Author
Message
Posted Tuesday, April 1, 2008 9:58 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, February 21, 2013 2:41 AM
Points: 271, Visits: 97
Comments posted to this topic are about the item SQL Server 2005
Post #478219
Posted Wednesday, April 2, 2008 7:55 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: Yesterday @ 10:23 AM
Points: 3,299, Visits: 1,978
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?".
Post #478510
Posted Wednesday, April 2, 2008 8:07 AM


SSC-Addicted

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

Group: General Forum Members
Last Login: Friday, July 11, 2014 9:08 AM
Points: 491, Visits: 223
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
Post #478525
Posted Wednesday, April 2, 2008 8:14 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 7:27 PM
Points: 33,204, Visits: 15,351
If a tree falls in the forest ...

Kenneth, I think you're splitting hairs. It's not enabled, meaning able to be used until you reconfigure.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #478535
Posted Wednesday, April 2, 2008 8:15 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: Yesterday @ 10:23 AM
Points: 3,299, Visits: 1,978
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
Post #478536
Posted Wednesday, April 2, 2008 3:33 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 3:20 PM
Points: 599, Visits: 969
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
Post #478865
Posted Thursday, April 3, 2008 7:12 AM


SSC-Addicted

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

Group: General Forum Members
Last Login: Friday, July 11, 2014 9:08 AM
Points: 491, Visits: 223
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
Post #479167
Posted Thursday, April 3, 2008 11:14 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 3:20 PM
Points: 599, Visits: 969
Ah, that makes more sense. Sometimes BOL assumes we know more that we do! ;)


Here there be dragons...,

Steph Brown
Post #479404
Posted Friday, April 4, 2008 4:02 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

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.
Post #479796
Posted Friday, April 4, 2008 6:18 AM


SSC-Addicted

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

Group: General Forum Members
Last Login: Friday, July 11, 2014 9:08 AM
Points: 491, Visits: 223
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
Post #479878
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse