Invoke-SqlCmd output sql executed

  • Hi, is it possible to output the sql executed by Invoke-sqlcmd when an inputFile with variables is used ?

    Thanks in advance,

    Rui

  • Have you tried:

    • -e parameter which echoes the input?
    • -Verbose parameter which outputs more information?
    • -WhatIf parameter which only outputs what it would do but does nothing?

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • Any luck ruy.peter?

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • Gary Varga (5/22/2015)


    Have you tried:

    • -e parameter which echoes the input?
    • -Verbose parameter which outputs more information?
    • -WhatIf parameter which only outputs what it would do but does nothing?

    Gary no luck! 🙁

    -e : I think is not supported in Invoke-SQLCMD cmdlet

    -Verbose : although supported does not return what I want

    -Whatif: parameter not supported

    Thanks anyway for the tips,

    Rui

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

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