Unable to use xp_cmdshell inside of table trigger

  • When creating a new record I am getting Insert Failed when insert trigger has xp_cmdshell in it.

  • skb 44459 - Tuesday, July 31, 2018 6:45 AM

    When creating a new record I am getting Insert Failed when insert trigger has xp_cmdshell in it.

    What are you trying to do?

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • Trying to create a folder on the network. But even my command says xp_cmdshell 'dir c:\', it errors out with insert fail.

  • What's the error?
    What's the result of this query?

       SELECT
          CASE
             WHEN value=1 THEN 'xp_cmdshell is enabled'
             ELSE 'xp_cmdshell is not enabled'
          END [xp_cmdshell status]
       FROM sys.configurations WHERE Name = 'xp_cmdshell';


    By the way, when posting a question to a forum , think about what information you would need to try to answer the question, and provide that up front.

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

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