CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • SQLSTATE 42000 Error 15281

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    1235
  • Date Created
    Friday, June 18, 2021
  • This Article Has been Viewed
    596 times
  • Short Desc
    SQL Server Management Studio Job may not work if the xp_cmdshell is not enabled.
  • Details
    By default [xp_cmdshell] is disabled, which will cause the following error to occur during a [SQL Server Agent] [Job].

     


    Date 6/18/2021 9:30:00 PM
    Log Job History (Transaction Backup)

    Step ID 1
    Server SQL-06\SQL2019
    Job Name Transaction Backup
    Step Name Trans Backup
    Duration 00:00:00
    Sql Severity 16
    Sql Message ID 3013
    Operator Emailed
    Operator Net sent
    Operator Paged
    Retries Attempted 0

    Message
    Executed as user: Your-Domain\sqlagent. ...ponent 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', search for 'xp_cmdshell' in SQL Server Books Online. [SQLSTATE 42000] (Error 15281)
  • Recreate Issue
    If the [XPCmdShellEnabled] is set to [False], this error will happen.
  • Resolve Issue
    To enable the [xp_cmdshell].

    Right-click on the SQL Server Instance Name on the left side of the SSMS Tree.
    Choose [Facets]
    Choose [Surface Area Configuration] from the [Facets] Menu.
    Change the value of the [XPCmdShellEnabled] from [False] to [True].
    Click [OK]
    Rerun your job, and this time it should complete without issue.