powershell-module

How to execute .sql file using powershell?

旧城冷巷雨未停 提交于 2019-11-26 10:24:37
问题 I have a . sql file. I am trying to pass connection string details through a Powershell script and invoke an .sql file. I was searching and came up with a cmdlet related to Invoke-sqlcmd . While I was trying to find a module corresponding to SQL, I did not find any one in my machine. Should I install anything in my machine (the machine already has SQL Server Management Studio 2008 R2) to get the modules or is there any easy way to execute .sql files using Powershell? 回答1: Try to see if SQL