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

  • Thom A - Thursday, January 4, 2018 3:54 AM

    What is the .sql file doing? Why are you wanting to execute SQL from a file in a (shared) file path? Is it so that it can be dynamic? Is it procedurally generated perhaps? There are far safer ways than just executing a .sql file. Like John said, if anyone has access to modify it, they could easily do a huge amount of damage.

    + 1,000,000 to that!

    --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)