Hi
I have the below powershell
code:
$sqlpublish = Start-Process -FilePath sqlpackage.exe -ArgumentList '/Action:Publish','/SourceFile:"Database Services\bin\Release\Database Services.dacpac"',"/TargetConnectionString:""Data Source=${Env};Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False;Initial catalog=${Target}""","/p:BlockOnPossibleDataLoss=${Data_loss}" -wait -PassThru -Credential $Cred -RedirectStandardOutput sqlstdout.txt -RedirectStandardError sqlstderr.txt
$sqlpublish.WaitForExit()
$sqlpublish
if ($sqlpublish.ExitCode -eq 0) {
Get-Content sqlstdout.txt
}
else {
echo "An error occurred"
Get-Content sqlstderr.txt
exit $sqlpublish.ExitCode
}
up until now it worked fine, but suddenly it fails, and the sqlstderr.txt
is empty, so I have no clue what is the reason. can you please advise?