Share via


Quick Bytes: Configuring XP_cmdshell and Agent XPs in SQL Server 2008

Here are ready to use SQL scripts

 For Enabling XP_cmdshell:

USE

master

EXECUTE

sp_configure 'show advanced options', 1

RECONFIGURE

WITH OVERRIDE

GO

EXECUTE

sp_configure 'xp_cmdshell', '1' -- use 1 to enable it, 0 to disable it

RECONFIGURE

WITH OVERRIDE

GO

EXECUTE

sp_configure 'show advanced options', 0

RECONFIGURE

WITH OVERRIDE

GO

  

 For Enabling Agent XPs:

 

USE master

EXECUTE

sp_configure 'show advanced options', 1

RECONFIGURE

WITH OVERRIDE

GO

EXECUTE

sp_configure 'Agent XPs', '1' -- use 1 to enable it, 0 to disable it

RECONFIGURE

WITH OVERRIDE

GO

EXECUTE

sp_configure 'show advanced options', 0

RECONFIGURE

WITH OVERRIDE

GO

Comments

  • Anonymous
    March 11, 2009
    PingBack from http://www.anith.com/?p=17762

  • Anonymous
    July 08, 2009
    How can we done through GUI Mode in sql 2008.

  • Anonymous
    July 09, 2009
    You can do that in GUI by Right Clicking the Object Explorer > Go To Facets.