1

I try to run the following command:

$serverName = 'firjt6'
Invoke-DbaQuery -SqlInstance 'some site' -Database 'CM_IDC' -Query $query -SqlParameters @{SrvName = $serverName} 

And I keep on getting the following error:

[Invoke-DbaQuery] Failure | The wait operation timed out

Does anyone know where should I add the command TimeOut property?

$serverName = 'firjt6'
Invoke-DbaQuery -SqlInstance 'some site' -Database 'CM_IDC' -Query $query -SqlParameters @{SrvName = $serverName}
Mathias R. Jessen
  • 157,619
  • 12
  • 148
  • 206
  • 1
    Something like [`-QueryTimeout` parameter](https://www.powershellgallery.com/packages/dbatools/0.9.419/Content/functions%5CInvoke-DbaQuery.ps1)? – JosefZ Jun 29 '19 at 22:28
  • yes, where should I add this parameter? – Taylor Work Jun 30 '19 at 07:31
  • 1
    Add a _named_ parameter anywhere. In doubts, observe all possible syntax patterns using `get-command -Name Invoke-DbaQuery -Syntax` – JosefZ Jun 30 '19 at 10:58

0 Answers0