Skip to content

Running DbUp against a SQL Azure Database server using EnsureDatabase fails with a Timeout error when creating the database #2

@MarkPow

Description

@MarkPow

The code responsible for creating the database is in SqlServerExtensions (https://github.com/DbUp/DbUp/blob/master/src/DbUp/Support/SqlServer/SqlServerExtensions.cs). If I increase the CommandTimeout then EnsureDatabase works against a SQL Azure server:

        // Create the database...
        using (var command = new SqlCommand(sqlCommandText, connection)
        {
            CommandType = CommandType.Text
        })
        {
            command.CommandTimeout = 120;
            command.ExecuteNonQuery();
        }

Unfortunately I'm new to GitHub etiquette and protocol (and having now posted, not sure why my first two sentences are in bold!) so not sure how to go about getting this into the main branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Bugs

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions