Delphix Toolkits (dxToolkit and dxmToolkit)

 View Only
  • 1.  How can i change db user password for 60 dataSets- dxtoolkit

    Posted 03-19-2021 10:06:00 AM
    Edited by Himanshu Sangwan 03-19-2021 10:06:35 AM
    Hi I have 60 environments SQL  and there is requirement to change DB password in every 90 days so when we try to do it manually it locked the db credentials becuase all my 60 data sets/dsources does a handshake in every 60 sec and pass the number of retries ...which results in locking the password...

    Manual solution is .disable environment and data sets and change the password on db first then update the password delphix UI and enable the envioronment.

    but this is a ongoing process so i am looking to automate this task via dxtoolkit where i can put all my datset list and it will update the password on one go 

    any suggestions ?

    Thanks 
    Himanshu

    -------


  • 2.  RE: How can i change db user password for 60 dataSets- dxtoolkit

    Posted 03-19-2021 11:50:00 AM

    1)  It looks like you need dx_set_dbpass.  Like all dxtoolkit commands, you can run it across multiple engines.

    (dvp21) ranzo.taylor@RanzoTaylorsMBP dxtoolkit2 % ./dx_set_dbpass --help

    SYNOPSIS

         dx_set_dbpass [ -engine|d <delphix identifier> | -all ] [ -configfile file ][ -group group_name | -dbname db_name | -host host_name | -type dsource|vdb ] [-username <username>] -password <password> [ --help|? ] [ -debug ]

    DESCRIPTION

        Change user password for a specified database(s)

    ARGUMENTS

        Delphix Engine selection - if not specified a default host(s) from

        dxtools.conf will be used.

        -engine|d Specify Delphix Engine name from dxtools.conf file

        -all Run script on all engines

        -group Group Name

        -dbname Database Name

        -host Host Name

        -type Type (dsource|vdb)

        -username user Specify a user

        -password pass Specify a password

    OPTIONS

        -force Skip credential validation. Credentials are verified by update

        API for all Oracle objects

        -help Print this screen

        -debug Turn on debugging

    EXAMPLES

        Setting new password

         dx_set_dbpass -d Landshark5 -dbname "Oracle dsource" -username delphixdb -password newpass

         Password has been set.

        Trying to set a wrong password

         dx_set_dbpass -d Landshark5 -dbname "Oracle dsource" -username delphixdb -password fake

         Password check failed.

         Username or password is invalid.

    2)  To solve this problem more generally, Delphix is introducing support for password vaults.  Please let us know if Hashicorp or Cyberark would be a useful integration for you regarding database connections?

    3)  For Oracle specifically, the latest version of Delphix (6.0.7) eliminates the need for a database user.  Instead, we use only an OS user.  This would also nicely solve your issue!



    ------------------------------
    Ranzo Taylor
    Technical Services Director
    Delphix
    ------------------------------



  • 3.  RE: How can i change db user password for 60 dataSets- dxtoolkit

    Posted 03-19-2021 12:06:00 PM
    Hi Ranzo,

    Thanks for sharing the delphix command ...I need more help here...

    how do i resolve this for 60 data sets specially in case where  need to change pwd for 60 in 1 min ...

    ------------------------------
    Himanshu Sangwan
    Engineering Lead, Tools & Automation
    Ontario Teachers' Pension Plan
    ------------------------------



  • 4.  RE: How can i change db user password for 60 dataSets- dxtoolkit

    Posted 03-23-2021 08:38:00 AM
    Edited by Himanshu Sangwan 03-23-2021 10:07:34 AM
    we tried this but query failed 

    D:\dxtoolkit2-v2.4.8-win64-installer\dxtoolkit2>dx_set_dbpass -d delphixengine -group MSSQL_TEST -dbname "gX" -username delphixdb_prod -password Password123

    MS SQL database user type is now required

    Password check failed.

    Username or password is invalid.

    Problem with setting password



    ------------------------------
    Himanshu Sangwan

    ------------------------------



  • 5.  RE: How can i change db user password for 60 dataSets- dxtoolkit

    Posted 03-23-2021 11:29:00 AM
    Himanshu:

    1)  The performance of dxtoolkit is unlikely in my opinion to work fast enough for you (60 in 60 seconds) with the default setup of running serially.  This approach is simple, but it will likely take a few minutes.  But you can probably use your own job scheduler (lots of tools out there) to run it in parallel.  That's outside the scope of what I can fully solve for you in a user forum, but if you want you can get in touch with Delphix Services through your account team.

    2)  I've reached out to some folks about your error.

    ------------------------------
    Ranzo Taylor
    Technical Services Director
    Delphix
    ------------------------------



  • 6.  RE: How can i change db user password for 60 dataSets- dxtoolkit

    Posted 03-23-2021 01:10:00 PM
    It looks like the current commadn works for 5.3.8.1 version but not working with latest delphix 6.0.6.1 version 
    dxtoolkit version used - dxtoolkit2-v2.4.8-win64-installer

    ------------------------------
    Himanshu Sangwan
    Engineering Lead, Tools & Automation
    Ontario Teachers' Pension Plan
    ------------------------------



  • 7.  RE: How can i change db user password for 60 dataSets- dxtoolkit

    Posted 03-23-2021 02:27:00 PM
    https://github.com/delphix/dxtoolkit/issues/176 opened for this issue.  Thank you!

    ------------------------------
    Ranzo Taylor
    Technical Services Director
    Delphix
    ------------------------------