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


SQL Server 2005


SQL Server 2005

Author
Message
ginni.sinha
ginni.sinha
SSC Veteran
SSC Veteran (279 reputation)SSC Veteran (279 reputation)SSC Veteran (279 reputation)SSC Veteran (279 reputation)SSC Veteran (279 reputation)SSC Veteran (279 reputation)SSC Veteran (279 reputation)SSC Veteran (279 reputation)

Group: General Forum Members
Points: 279 Visits: 97
Comments posted to this topic are about the item SQL Server 2005
Ken Wymore
Ken Wymore
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5123 Visits: 2377
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?".
Jeff Deluca
Jeff Deluca
Mr or Mrs. 500
Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)

Group: General Forum Members
Points: 579 Visits: 229
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
Steve Jones
Steve Jones
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: Administrators
Points: 65517 Visits: 19118
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
My Blog: www.voiceofthedba.com
Ken Wymore
Ken Wymore
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5123 Visits: 2377
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
Stephanie J Brown
Stephanie J Brown
SSC Eights!
SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)

Group: General Forum Members
Points: 918 Visits: 1103
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
Jeff Deluca
Jeff Deluca
Mr or Mrs. 500
Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)

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

Cheers
Stephanie J Brown
Stephanie J Brown
SSC Eights!
SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)SSC Eights! (918 reputation)

Group: General Forum Members
Points: 918 Visits: 1103
Ah, that makes more sense. Sometimes BOL assumes we know more that we do! Wink


Here there be dragons...,

Steph Brown
vishal.kapoor2007
vishal.kapoor2007
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 86
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.
Jeff Deluca
Jeff Deluca
Mr or Mrs. 500
Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)

Group: General Forum Members
Points: 579 Visits: 229
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
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