Hello Ola,
If you want to manage a VDBs based on dSource, you need to use this:
dx_get_db_env -d engine_name -dsource dSource_Name
The name of filter -dsource can be misleading - it's selecting a VDB based on parent, so if you have a chain of VDBs
like PROD1 -> VDB1 -> VDB2, dxtoolkit will do the following:
-dsource PROD1 -> it will select VDB1
-dsource VDB1 -> it will select VDB2
If you want to disable all databases ( including all children, grant children and so on ), it's more complicated as
there is no single filter to that.
You can list all databases hierarchy using dx_get_hierarchy -d engine_name -printhierarchy p2c
but then you will need to parse output into comma separated list of VDBs to disable
I will add a RFE for dxtoolkit to handle -dsource parameter better
regards,
Marcin
------------------------------
Marcin Przepiorowski
Director, Technical Services
Delphix
------------------------------
Original Message:
Sent: 01-05-2023 02:11:58 PM
From: Ola Omidiran
Subject: dxtoolkit command to disable/shutdown all vdbs
Hello Marcin,
I hope it's ok to jump on the back of Chris's original question. My question has a slightly different angle though in that I want to be able to shutdown / start all children dependencies of each dSource in one go i.e. VDBs & associated (selfservice) containers.
So, to save existing state and disable all associated VDBs & containers, could I run something like this:
- dx_get_db_env -d engine_name -type dsource -dsource dSource_Name -save /path/to/savefile
- dx_ctl_db -d engine_name -type dsource -dsource dSource_Name -action disable -parallel 4
And to restart/enable all that were enabled before (and in the correct order of precedence):
dx_ctl_db -d engine_name -type dsource -dsource dSource_Name -restore /path/to/savefile
Thanks!
------------------------------
Ola Omidiran
Community Member
Mizuho International plc UK
Original Message:
Sent: 12-16-2022 03:05:19 AM
From: Marcin Przepiorowski
Subject: dxtoolkit command to disable/shutdown all vdbs
Hi Chris,
You can use this command:
dx_ctl_db -d engine -type VDB -action disable -parallel 4
and it will be disable all VDB's from Delphix engine specify by -d parameter.
After maintenance you can enable all VDB's using similar command
dx_ctl_db -d engine -type VDB -action enable -parallel 4
If for any reason you have a VDBs in different states - for example a few enabled and a few disabled
and you want to keep that state you can use the following:
to save a state and disable VDBs use this:
dx_get_db_env -d engine -save /path/to/savefile
dx_ctl_db -d engine -type VDB -action disable -parallel 4
to enable only VDB which were enabled before maintenance use:
dx_ctl_db -d engine -restore /path/to/savefile
regards,
Marcin
------------------------------
Marcin Przepiorowski
Director, Technical Services
Delphix
Original Message:
Sent: 12-15-2022 12:21:38 PM
From: Chris Patton
Subject: dxtoolkit command to disable/shutdown all vdbs
Hello, might anyone have a dxtoolkit command that will disable/shutdown all vdbs in prep for a Delphix Virtualization engine reboot? And then an equivalent to enable them once the engine is available again? Thank you in advance for any tips/recommendations.
------------------------------
Chris Patton
Database Adminstrator, Sr
CalOptima
------------------------------