invoke-sqlcmd -querytimeout 0 still times out - by Grant Fritchey

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


25
0
Sign in
to vote
ID 551799 Comments
Status Closed Workarounds
Type Bug Repros 9
Opened 4/16/2010 6:05:11 AM
Access Restriction Public

Description

There is no way to remove the invoke-sqlcmd timeout even though the implied value for this is a timeout of zero (0).

This was previously posted by someone else here: https://connect.microsoft.com/PowerShell/feedback/details/523996/invoke-sqlcmd-querytimeout

I am able to reproduce their findings and I've run into this with a production system. 
For now I've set the value to the max 65535. The queries I'm running are only hitting about 2 minutes, but I were running larger or more complex queries, this would be a serious issue.
Sign in to post a comment.
Posted by cmille19 on 4/4/2013 at 12:42 PM
Related to this bug. A documentation error:

-QueryTimeout <int>
    Specifies the number of seconds before the queries time out. If a timeout value is not specified, the queries do no
    t time out. The timeout must be an integer between 1 and 65535.

    Required?                    false
    Position?                    named
    Default value
    Accept pipeline input?     false
    Accept wildcard characters? false

Even in the "fixed" version of invoke-sqlcmd in SQL 2012 the default querytimeout is 30 seconds if no querytimeout is specified.
Posted by Microsoft on 4/25/2011 at 6:11 AM
Hi:

This issue has been fixed, and has been verified internally. This should be available in the next available public release of SQL Server Code-Named “Denali”.

Thanks for writing in to Microsoft.

Cheers,

Jyoti Kumar
Posted by Michael Ferguson on 2/23/2011 at 10:58 AM
Oops -- Actually SQL 2008 SP2 (10.0.4000).
Posted by Michael Ferguson on 2/23/2011 at 10:57 AM
This bug is marked as fixed. Any idea what release of SQL Server (SP or CU) this is fixed in? I am running 2008 SP4 and can still reproduce the issue. I'm using the PowerShell snapin "SqlServerCmdletSnapin100".