Passwords and the "Deploy from Database Release" step

swinghouseswinghouse Posts: 120 Bronze 2
edited December 17, 2015 6:16AM in DLM Automation
Hi,

I have an issue with the "Redgate - Deploy from Database Release" step for Octopus Deploy. It concerns the Password field - hardcording the password in the step GUI works fine, but if I replace the hardcorded password with a variable reference - e.g. #{Password} - deployments fail with SQL Release reporting the following error:
Couldn't connect to the database specified by the InputObject parameter: System.Data.SqlClient.SqlException (0x80131904): Login failed for user [correct_username_from_variable]

(I replaced the actual username with a pseudo name in the quote - the username is looked up properly from a variable.)

Do you know if there's an issue with looking up the password from an Octopus variable in the "Redgate - Deploy from Database Release" step? Or might I be doing something wrong?

Program versions:
Octopus Deploy: 3.2.6
DLM Automation Suite: 1.3.2.233
SQL Release: 1.2.6.97

/Mattias

Comments

  • Hey swinghouse,

    Specifying the username and password through the Octopus Deploy variables like you indicated should work fine for SQL Release step templates. I have just double checked it and it appears to be working. Couple of things that comes to my mind:

    - make sure that you are typing the password correct under the variables page.
    - make sure that your variable has been scoped correctly. See this for more info: http://docs.octopusdeploy.com/display/O ... +variables
    Tugberk Ugurlu
    Technical Lead, Data Privacy & Protection
    Redgate Software Ltd.
  • swinghouseswinghouse Posts: 120 Bronze 2
    Hi,

    Thanks for the help!

    I just double-checked my password variable values and scopes, and everything seems fine - but still no joy I'm afraid.

    - Password variable value: I could successfully log in to the target db server from the Tentacle when I copy/pasted the correct password. I then pasted the same password to the variable definition in Octopus and created a new release. Result: Same error as in my original post. Hardcoding the password in the step configuration works fine, but of course that makes it rather cumbersome when you deal with multiple target db servers.
    - Password variable scope: I use the same scoping rule for other variables, such as the SQL Server user, and I can confirm that Octopus picks up the correct value for the other variables. It's just the password variable that acts up.

    What else could be wrong?

    /Mattias
  • swinghouseswinghouse Posts: 120 Bronze 2
    I forgot to mention that the same error occurs on the "Create Database Release" step.
  • Hi Swinghouse,

    I have now logged a support incident for this incident and will carry out troubleshooting from there.

    You should get an email regarding this incident very shortly.

    Thank you,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
Sign In or Register to comment.