Compile .sql script file using powershell

Welcome Forums General PowerShell Q&A Compile .sql script file using powershell

This topic contains 1 reply, has 2 voices, and was last updated by

2 years, 2 months ago.

  • Author
  • #61362

    Points: 0
    Rank: Member

    Looking for compilation of .sql script file using powershell code.

    -> For example few .sql script files having wrong objects name or wrong columns names which are not located in the database or columns at tables. Then using powershell script I need to find out.

    I think we can use one of the .dll file will check that compilation process.

    Using the following keywords inside the tsql script will get the errors list without executing of tsql script.
    -> SET FMTONLY ON: Getting meta data of objects not getting the rows of data.

    ->SET NOEXEC ON: It will only compile the data but not giving any errors list.

    Is there any possibility to get the same behavior using powershell.
    Please guide me how to accomplish this task.

  • #61551

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Unfortunately, I have no idea whatsoever what you're asking. You can certainly invoke T-SQL statements from within PowerShell, but as far as I'm aware it can't "compile a .sql script."

The topic ‘Compile .sql script file using powershell’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort