我从 切换sqlcmd
到Invoke-SqlCmd
,突然我的 RAISERROR 消息消失了。当我用 运行它时sqlcmd
,它们会出现。有什么办法让它们可见Invoke-SqlCmd
吗?
RAISERROR (N'Hello World',0,1) WITH NOWAIT;
Invoke-SqlCmd -Server $env:MSSQL_SERVERNAME -Username $env:MSSQL_USERNAME -Password $env:MSSQL_PASSWORD -Database "mydatabase" -Query "EXEC dbo.myprocedure" -OutputSqlErrors $true;
/opt/mssql-tools/bin/sqlcmd -S $env:MSSQL_SERVERNAME -U $env:MSSQL_USERNAME -P $env:MSSQL_PASSWORD -d mydatabase -Q "EXEC dbo.myprocedure";