Skip to content

Issue with SQL - Execute SQL Script Files - SqlAuthentication Bug Multiple Files Only #1669

@tjHol888

Description

@tjHol888

Step template

SQL - Execute SQL Script Files

Step version

No response

Octopus version

No response

Step template parameter inputs

No response

What happened

NotSpecified: Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Username' Key being added: 'Username'"

Reproduction steps

Have multiple scripts and use SqlAuthentication

More Information

This code needs to only do this outside a loop, or only once within a loop

"SqlAuthentication" {
                    Write-Verbose "Authentication with SQL Authentication ..."
                    $sqlcmdArguments.Add("Username", $username)
                    $sqlcmdArguments.Add("Password", $password)

                    break
                }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions