locked
Permission to execute xp_servicecontrol procedure RRS feed

  • Question

  • Team,

    I need  to provide permission to execute "xp_servicecontrol" procedure only. However,  don't want to add in sysadmin role. Is there any way to accomplish the same 


    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    Wednesday, November 13, 2019 3:11 PM

All replies

  • xp_servicecontrol is an undocumented Extended stored procedure; don't use it at all.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Wednesday, November 13, 2019 3:25 PM
  • This is being used by one of the monitoring tool. using this, they are fetching the status of services.

    What should be other option.


    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    Wednesday, November 13, 2019 3:44 PM
  • Your monitoring tool should use methods appropriate for that development environment. Programatically you could use the .Net ServerController.  
    Wednesday, November 13, 2019 4:55 PM
  • Hi Chetan_DBA,

     

    As Oiaf said,  xp_servicecontrol is an undocumented Extended stored procedure. Based on my experience , the execution permission of the sp that gets the entire instance state is generally required by sysadmin. I suggest you refer to the method provided by scott.

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, November 14, 2019 7:29 AM