Reconfigure xp_cmdshell question

  • A very quick question (which should have a short answer)

    If

    EXEC master.dbo.sp_configure 'show advanced options', 1

    RECONFIGURE

    EXEC master.dbo.sp_configure 'xp_cmdshell', 1

    RECONFIGURE

    allows use of xp_cmdshell

    does

    EXEC master.dbo.sp_configure 'show advanced options', 1

    RECONFIGURE

    EXEC master.dbo.sp_configure 'xp_cmdshell', 0

    RECONFIGURE

    switch it off again ?

    Thanks in advance

    Stuart

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Stuart Davies (9/11/2009)


    A very quick question (which should have a short answer)

    If

    EXEC master.dbo.sp_configure 'show advanced options', 1

    RECONFIGURE

    EXEC master.dbo.sp_configure 'xp_cmdshell', 1

    RECONFIGURE

    allows use of xp_cmdshell

    does

    EXEC master.dbo.sp_configure 'show advanced options', 1

    RECONFIGURE

    EXEC master.dbo.sp_configure 'xp_cmdshell', 0

    RECONFIGURE

    switch it off again ?

    Thanks in advance

    Stuart

    Not quite :

    you might get the following with your t-sql

    Msg 5808, Level 16, State 1, Line 1

    Ad hoc update to system catalogs is not supported.

    Change your RECONFIGURE statement to be RECONFIGURE WITH OVERRIDE

    and i would suggest that you reset the advanced options back to 0 as well, unless you need it that way.

    And yes it would change it back.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • Many thanks for your prompt reply

    Stuart

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

Viewing 3 posts - 1 through 2 (of 2 total)

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