Open Pxtl opened 1 year ago
It seems like a similar issue applies to ARM64 machines. Using Invoke-SqlCmd 22.1.1, I get the following error when trying to Invoke any command against a remote SQL server:
Error while executing a SQL script. Microsoft.SqlTools.ServiceLayer.BatchParser.BatchParserException: Incorrect syntax was encountered while parsing ''. at Microsoft.SqlTools.ServiceLayer.BatchParser.Parser.RaiseError(ErrorCode errorCode, Token token, String message) at Microsoft.SqlTools.ServiceLayer.BatchParser.Parser.ExecuteBatch(Int32 repeatCount) at Microsoft.SqlTools.ServiceLayer.BatchParser.Parser.ParseLines() at Microsoft.SqlServer.Management.PowerShell.ExecutionProcessor.ExecuteTSql(String sqlCommand)
Hi @Pxtl - are you getting that error with the v21 version of the module? If so, that's... by design, in the sense there's not much I can do right now. v22+ is the future, so try that instead and let me know.
@AlexanderTrusheim - that's a known issue and with Microsoft.Data.SqlClient finally available for ARM64, it should be a limitation/issue I can lift. I'll repurpose this issue to address it.
Ah, yes, you're right, I was in the process of migrating from v21 to v22 when I hit this, and I've checked it again and it is not a problem in v22. Sorry for the false alarm.
To reproduce:
Launch
Windows Powershell (x86)
on a windows 10 machine.Then execute
Yields
Now, it's perfectly reasonable that this module may not support running on 32-bit machines or there may be extra steps involved in making that happen, but a better error-message for this case would be appreciated. With the "BatchParser" error, the user does not know what caused the problem or what the resolution is.