Delphix Products

 View Only
  • 1.  How to refresh all VDBs of a SQL Server an Environment

    Posted 11-28-2022 04:32:00 AM
    Hi - Using the APIs I can refresh a single VDB using below commands, what would be the best way to refresh all VDBs hosted in my Delphix environment (Manish\SQL2017)

    MyDelxServer> database
    MyDelxServer database > database ls
    MyDelxServer database> select Manish\SQL2017/MyDB
    MyDelxServer database 'Manish\SQL2017/MyDB'> refresh
    MyDelxServer database 'Manish\SQL2017/MyDB' refresh *> set timeflowPointParameters.container=My-PROD-dSource/MyDB
    MyDelxServer database 'Manish\SQL2017/MyDB' refresh *> commit


    Thanks
    Manish

    ------------------------------
    Manish K
    Delphix Community Members
    ------------------------------


  • 2.  RE: How to refresh all VDBs of a SQL Server an Environment
    Best Answer

    Posted 11-28-2022 04:47:00 AM
    I don't believe there is an API for this type of bulk refresh. However, you can script around the API, or use existing tools (which script around the API) to achive this. For instance

    https://github.com/delphix/dxtoolkit/wiki/dx_refresh_db

    or

    https://github.com/delphix/delphixpy-examples/blob/master/dx_refresh_db.py

    both have bulk refresh features.

    ------------------------------
    Eyal Kaspi
    Principal Engineer
    Delphix
    ------------------------------



  • 3.  RE: How to refresh all VDBs of a SQL Server an Environment

    Posted 11-28-2022 10:10:00 PM
    Thanks Eyal, i'll review the given urls.

    ------------------------------
    Manish K
    Delphix Community Members
    ------------------------------



  • 4.  RE: How to refresh all VDBs of a SQL Server an Environment

    Posted 11-28-2022 03:24:00 PM
    Hi Manish,

    Be careful when refresh multiple VDBs simultaneously.
    When mounting, we use diskpart on Windows side for a few things.  One is rescan the drives listing so we can gather info on the disk used for a specific VDB.
    This is done serially as there are issues when multiple diskpart executions are run.
    We serialize on engine and form a queue to process the mount requests one after the other.
    Part of Provision also runs recovery on the VDB files when provisioned and this can also take time depending on what is in the snapshot.
    If you have several VDBs, like over 10-15, you might want to stagger the VDBs on refresh by a few minutes.  Best way to tell is to run some refreshes and check times when running 1, 2, 4, 10, etc and then it should give you an idea on how many can be bunched together.

    Cheers,


    ------------------------------
    Paul Vero
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 5.  RE: How to refresh all VDBs of a SQL Server an Environment

    Posted 11-28-2022 10:18:00 PM

    Thanks Paul for detailed information about diskpart, I have close to 14-16 vdbs per environments, every week on random days need to refresh all our 5 environment having 70+ vdbs, so was looking some way to script all those and do quickly instead of manually doing from the UI.



    ------------------------------
    Manish K
    Delphix Community Members
    ------------------------------