When I was installing Sitecore 9 I got an error ERROR_SCRIPTDOM_NEEDED_FOR_SQL_PROVIDER. This error could appear in other scenarios that involve SQL as well.
I was sure I have all SQL provider dependencies including T-SQL ScriptDom installed. The issue was resolved when I used gacutil on the scriptDom dll with the command below in the command prompt window:
“<C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil>” /i “<C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\140\Microsoft.SqlServer.TransactSql.ScriptDom.dll>”
Your gacutil and scriptDom dll may be in a different folder as in mine. Before using the command please check and correct the paths if they are different.