Query Timeout on Windows 2016 Server with SqlServer module

%3CLINGO-SUB%20id%3D%22lingo-sub-1316885%22%20slang%3D%22en-US%22%3EQuery%20Timeout%20on%20Windows%202016%20Server%20with%20SqlServer%20module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1316885%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20been%20using%26nbsp%3B%3C%2FP%3E%3CP%3EInvoke-sqlcmd%20with%20a%20Querytimeout%200%20to%20get%20infinite%20timeout%20period%20on%20Windows%202008%20R2%20server%20using%20SqlPs%20module.%3C%2FP%3E%3CP%3EUpgraded%20the%20server%20to%20Windows%202016%20server%20and%20installed%20SqlServer%20powershell%20module.%20Now%20my%20Invoke-sqlcmd%20is%20timing%20out%20the%20queries%20after%2030%20seconds%20for%20the%20Querytimeout%20configuration%200.%3C%2FP%3E%3CP%3EI%20have%20been%20looking%20for%20a%20documentation%20that%20talks%20about%20this%20behavior%20change%20and%20could%20not%20find%20one.%20Is%20there%20a%20way%20to%20get%20back%20the%20original%20behavior%3F%3C%2FP%3E%3CP%3EI%20have%20some%20practical%20issues%20in%20specifying%20a%20very%20high%20timeout%20value%20for%20Invoke-sqlcmd.%3C%2FP%3E%3CP%3EYour%20help%20is%20appreciated.%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ESuresh%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1316885%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Regular Visitor

I have been using 

Invoke-sqlcmd with a Querytimeout 0 to get infinite timeout period on Windows 2008 R2 server using SqlPs module.

Upgraded the server to Windows 2016 server and installed SqlServer powershell module. Now my Invoke-sqlcmd is timing out the queries after 30 seconds for the Querytimeout configuration 0.

I have been looking for a documentation that talks about this behavior change and could not find one. Is there a way to get back the original behavior?

I have some practical issues in specifying a very high timeout value for Invoke-sqlcmd.

Your help is appreciated.

Thanks,

Suresh

0 Replies