Home Forums Programming General Execute .sql script within a stored procedure without using xp_cmdshell RE: Execute .sql script within a stored procedure without using xp_cmdshell

  • juniorDBA13 - Wednesday, December 20, 2017 6:42 AM

    Hi,

    I want to execute a .sql script within a stored procedure but I want to do it without enabling xp_cmdshell.

    Any ideas?

    This is a form of "Death by SQL" no matter how you do it.  Perhaps if you explained why there's a need to do such a thing and what the script(s) will actually do, we might be able to recommend a much safer method.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)