SQL Timeout

paulrpaulr Posts: 2
edited April 1, 2015 8:27AM in DLM Automation
I'm getting this error on a line that's trying to drop a constraint.

WARNING: Error 'Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Could not drop constraint. See previous errors.' occurred when executing the following SQL:

I've tried using a connection string instead of using the New-DatabaseConnection cmdlet and it didn't seem to use the Connection Timeout setting. Am I missing something? Any help would be appreciated.

Paul

Comments

  • Hi Paul,

    We don't support full connection strings in SQL Release, we only support those parts we support through the New-DatabaseConnection cmdlet - Server, DataSource, IntegratedSecurity, UserId, Password. If you want us to support any other connection string properties then please put in a feature request on our uservoice.

    If you need to run the script then you can export the script to a file then run it through your preferred way of running scripts:
    $databaseUpdate.UpdateSql | Out-File <Path>Update.sql
    

    I hope this helps,
    Peter Gerrard

    Software Engineer
    Redgate Software
  • I looked into this issue recently. There isn't a standard connection string property that would allow us to set this timeout, unfortunately. However, in v1.2 of SQL Release, you can now set it using the new QueryBatchTimeout parameter of the Use-DatabaseRelease cmdlet, like this:

    $release | Use-DatabaseRelease -DeployTo $targetDatabase -QueryBatchTimeout 120

    This changes the timeout for each SQL batch in the update script from the default 30 seconds to 120 seconds.
    Chris Lambrou
    Software Engineer, SQL Monitor Team
Sign In or Register to comment.