Skip to content

DbOps displays SqlException error message twice #135

Open

Description

@michaelsync

I have the following script.

Install-DBOScript -ScriptPath ./sql-scripts/*.sql -SqlInstance localhost -Database DbUpTest -Credential $sqlcredential -ErrorAction Stop

I noticed that it's executing the file two files according to the error log as below. May I know why?

image

Activity

  1. nvarscar commented on Apr 21, 2022

    @nvarscar
    Collaborator

    The error log displays error output from two sources here: first comes from the DbUp framework, second comes from the error that it throughs, which is then processed by DBOps and regurgitated again. The script is only run once, but the error is shown twice. I will look into it at some point, though right now I'm not sure what's the best solution would be. Perhaps I'm not going to log SqlExceptions? I'll see how that works first.

  2. changed the title [-]Why does DbOps execute the script file two times when there is an error?[/-] [+]DbOps displays SqlException error message twice[/+] on Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions