SQL Server 2005

  • Comments posted to this topic are about the item SQL Server 2005

  • 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?".

  • 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

  • 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.

  • 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

  • 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

  • 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

  • Ah, that makes more sense. Sometimes BOL assumes we know more that we do! 😉


    Here there be dragons...,

    Steph Brown

  • 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.

  • 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

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply