xp_cmdshell is enable and disabled

  • Hi,

    i am enable the xp_cmdshell through command

    sp_configure 'xp_cmdshell',1

    reconfigure

    once i have enabled xp_cmdshell,

    it's again disabled i am not getting any error message,

    if any one can give solution.....

  • Does executing the below query help?

    sp_configure 'xp_cmdshell',1

    reconfigure with override

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • i have done this

    sp_configure 'xp_cmdshell',1

    go

    reconfigure with override

    certain fraction of seconds its enabled and again its disable

  • there must be some trigger / notification service capturing your action and reverting it.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • naresh.talla (3/29/2011)


    Hi,

    i am enable the xp_cmdshell through command

    sp_configure 'xp_cmdshell',1

    reconfigure

    once i have enabled xp_cmdshell,

    it's again disabled i am not getting any error message,

    if any one can give solution.....

    What are you trying to accomplish and what made you settle on using xp_cmdshell? There are many other options available that are more secure-able and arguably more stable and feature-rich.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • do you have any SQL Server 2008 policies in force that may be disabling it after enabling

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • how i can see any triggers or notifications......

  • Perry Whittle (3/29/2011)


    do you have any SQL Server 2008 policies in force that may be disabling it after enabling

    Ah, yes, that may even be the most trivial point to start looking.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Sql server 2008 policy is disable.....

    but when i enable xp_cmdshell its automatically disable.....

  • Do any of these queries result in rows ?

    use msdb ; -- forwarded messages

    go

    SELECT '' as 'Q_000', *

    FROM sys.server_event_notifications

    order by name

    go

    select '' as 'Q_000a', *

    from sys.server_triggers

    select '' as 'Q_000b', *

    from sys.server_trigger_events

    go

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • i have finally finds the problem one of my scheduled job executing below script at every 10 sec so that why cmdshell is disabled

    sp_configure 'xp_cmdshell',0

    reconfigure

    i am disable that job and its finally working..

    thanks for support....

  • Have you tried:-

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

    RECONFIGURE

    EXEC master.dbo.sp_configure 'xp_cmdshell', 1

    RECONFIGURE

    Matt

Viewing 12 posts - 1 through 11 (of 11 total)

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