-
Notifications
You must be signed in to change notification settings - Fork 34
dx_get_db_env
dx_get_db_env [-engine|d <delphix identifier> | -all ]
[-group group_name | -name db_name | -host host_name | -type dsource|vdb | -instancename instname | -olderthan date]
[-rdbms oracle|sybase|db2|mssql|vFiles | -reponame repository_name]
[-save]
[-masking]
[-parentlast l|p]
[-config]
[-configtype s|d]
[-backup path]
[-hostenv h|e]
[-offset]
[-cluster]
[-output_unit K|M|G|T]
[-format csv|json ]
[-help|? ] [ -debug ]
Get the information about databases.
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 Display databases on all Delphix appliance
- -configfile file Location of the configuration file. A config file search order is as follow:
- configfile parameter
- DXTOOLKIT_CONF variable
- dxtools.conf from dxtoolkit location
Filter databases using one of the following filters
- -group Group Name
- -name Database Name
- -host Host Name
- -type Type (dsource|vdb)
- -envname Environment name
- -dsource dsourcename Dsource name
- -instancename instname Instance name (Oracle)
- -rdbms oracle|sybase|db2|mssql|vFiles Filter by RDBMS type - this filter is implemented only in dx_get_db_env
- -reponame repository_name Filter using repository_name ( Oracle Home, MS SQL instance, etc)
Specify a instance number (only with combination with host)
- -instance inst_no Instance number
- -config Display a config of databases (db type, version, instance / Oracle home) plus others
- -configtype Display a config of databases including a database name on server
- -masking Display a masking status of databases plus a masking job
- -backup path Gnerate a dxToolkit commands to recreate databases ( Oracle / MS SQL support ) into path
- -parentlast l|p Change a snapshot column to display : l - a last snapshot time (default) p - parent snapshot for VDB
- -hostenv h|e Change a hostname/env column to display : h - target host name (default) e - target environment name
- -snappervdb By default snapshots for all objects are read to avoid an API call per VDB. This behaviour is not efficient for engine with many snapshots and this parameter is switching logic to read one snapshot per VDB. It should be used for Engines with many (1000's) snapshots
- -timeflowparent By default Parent Snapshot / Parent time will display a parent object snapshot used for provisioning or last refresh operation. With this flag set, dxtoolkit will use an old behaviour and display a timeflow parent snapshot which may be a parent database snapshot for provisioning / refresh or a current VDB snapshot if rollback operation was done.
- -offset Print database timestamp with offset rather then timezone name
- -output_unit K|M|G|T Display usage using different unit. By default GB are used Use K for KiloBytes, G for GigaBytes and M for MegaBytes, T for TeraBytes
- -cluster If hostenv is set to h (default) Print ; segrageted list of cluster nodes from the environment into hostname column If hostenc is set to e Print ; segrageted list of cluster nodes from the environment into a new column called Host list
- -format Display output in csv or json format If not specified pretty formatting is used.
- -help Print this screen
- -debug Turn on debugging
- -save <filename > Save enabled column into JSON file <filename.engine_name> to restore it later using dx_ctl_db
- -nohead Turn off header output
Columns description
- Appliance - Delphix Engine name from dxtools.conf file
- Hostname - Delphix environment hostname or IP address
- Env. name - Delphix environment name
- Database - Database name ( dSource or VDB )
- Group - Group name
- Type - Database type: dSource | VDB | CDB (Oracle Container) | vCDB ( Oracle Virtual Container )
- SourceDB - Parent name for VDB
- Parent snapshot - Parent snapshot time for VDB
- Last snapshot - Last snapshot time for VDB or dSource
- Used(GB) - Space used by database
- Status - Runtime status of database
- Enabled - Status of database
- Unique Name - Oracle database unique name
- Parent time - Parent time used for VDB provision (it can be snapshot time or exact time selected )
- VDB creation time - VDB creation time
- VDB refresh time - Last refresh time for VDB
- Host list - List of hosts in the environment
List all databases known to Delphix Engine
dx_get_db_env -d Landshark51
Appliance Hostname Database Group Type SourceDB Parent snapshot Used(GB) Status Enabled Unique Name
---------- -------------------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ---------- ---------- ---------- -------------
Landshark5 172.16.180.132 autotest Analytics VDB AdventureWorksLT2008R2 2016-12-07 10:32:26 PST 0.01 UNKNOWN enabled N/A
Landshark5 172.16.180.133 AdventureWorksLT2008R2 Sources dSource N/A 0.00 UNKNOWN enabled N/A
Landshark5 linuxsource Oracle dsource Sources dSource N/A 0.64 RUNNING enabled orcl
Landshark5 linuxsource Sybase dsource Sources dSource N/A 0.00 RUNNING enabled N/A
List databases from group "Analytics" and display last snapshot time
dx_get_db_env -d Landshark51 -group Analytics -parentlast l
Appliance Hostname Database Group Type SourceDB Last snapshot Used(GB) Status Enabled Unique Name
---------- -------------------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ---------- ---------- ---------- -------------
Landshark5 172.16.180.132 autotest Analytics VDB AdventureWorksLT2008R2 2016-12-07 18:49:04 GMT 0.01 RUNNING enabled N/A
List databases created from dSource "Sybase dsource"
dx_get_db_env -d Landshark51 -dsource "Sybase dsource"
Appliance Hostname Database Group Type SourceDB Parent snapshot Used(GB) Status Enabled Unique Name
---------- -------------------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ---------- ---------- ---------- -------------
Landshark5 LINUXTARGET testsybase Analytics VDB Sybase dsource 2016-09-26 10:16:00 EDT 0.00 RUNNING enabled N/A
Landshark5 LINUXTARGET testvdb Tests VDB Sybase dsource 2016-09-26 10:16:00 EDT 0.00 RUNNING enabled N/A
List all databases known to Delphix Engine showing environment name instead of hostname
dx_get_db_env -d Landshark51 -hostenv e
Appliance Env. name Database Group Type SourceDB Parent snapshot Used(GB) Status Enabled Unique Name
---------- -------------------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ---------- ---------- ---------- -------------
Landshark5 LINUXTARGET autotest Analytics VDB Oracle dsource 2016-12-08 10:44:38 EST 0.01 RUNNING enabled N/A
Landshark5 LINUXTARGET testsybase Analytics VDB Sybase dsource 2016-09-26 10:16:00 EDT 0.00 RUNNING enabled N/A
Landshark5 WINDOWSSOURCE AdventureWorksLT2008R2 Sources dSource N/A 0.00 UNKNOWN enabled N/A
Landshark5 LINUXSOURCE Oracle dsource Sources dSource N/A 0.67 RUNNING enabled orcl
Landshark5 LINUXSOURCE Sybase dsource Sources dSource N/A 0.00 RUNNING enabled N/A
Landshark5 LINUXTARGET testvdb Tests VDB Sybase dsource 2016-09-26 10:16:00 EDT 0.00 RUNNING enabled N/A
List databases from group "Analytics" with configuration
dx_get_db_env -d Landshark51 -group "Analytics" -config
Appliance Env. name Database Group Type SourceDB Repository DB type Version Other
---------- -------------------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ---------- ---------- ----------------------------------------------------------------------------------------------------
Landshark5 LINUXTARGET autotest Analytics VDB Oracle dsource /u01/app/oracle/11.2.0.4/db1 oracle 11.2.0.4.0 -redoGroup 3,-redoSize 100,-archivelog=yes,-mntpoint "/mnt/provision",-instname autotest,-uniqname a
Landshark5 LINUXTARGET testsybase Analytics VDB Sybase dsource LINUXTARGET sybase 15.7 SP101
Generate backup of databases metadata from group "Analytics" into directory /tmp
dx_get_db_env -d Landshark51 -group "Analytics" -backup /tmp
Exporting database autotest hooks into /tmp/autotest.dbhooks
Exporting database testsybase hooks into /tmp/testsybase.dbhooks
Backup exported into /tmp/backup_metadata_dsource.txt
Backup exported into /tmp/backup_metadata_vdb.txt
List masking status and jobs
dx_get_db_env -d Delphix32 -masking
Appliance Hostname Database Group Type SourceDB Masked Masking job
---------- -------------------- ------------------------------ --------------- -------- ------------------------------ ---------- ---------------
Delphix32 NA orcl_tar@LandsharkEngine Sources@Landsha dSource NO
Delphix32 CLUSTER racdb Sources dSource NO
Delphix32 10.0.0.152 test1 Sources dSource NO
Delphix32 10.0.0.152 maskvdb Test VDB test1 YES SCOTT_JOB
Print cluster nodes in the host mode
dx_get_db_env -d mssqlao -cluster
Appliance Hostname Database Group Type SourceDB Parent snapshot Used [GB] Status Enabled Unique Name Parent time VDB creation time VDB refresh time
-------------------- -------------------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ---------- ---------- ---------- ------------------------------ ----------------------------------- ----------------------------------- -----------------------------------
mssqlao host1.co;host2.co DBOMSR1C571E Sources dSource N/A 1.67 RUNNING enabled DBOMSR1C571E N/A 2024-01-29 13:34:08 N/A
mssqlao host1.co;host2.co slon Sources VDB DBOMSR1C571E 2024-01-29 07:35:06 EST 1.37 INACTIVE enabled slon 2024-01-29 07:35:06 EST 2024-01-29 13:37:25 2024-01-29 13:37:33
mssqlao 10.43.81.230;10.43.8 SQL2019DB Untitled dSource N/A 0.01 UNKNOWN enabled N/A N/A 2023-12-21 02:30:12 N/A
Print cluster nodes in the environment mode
dx_get_db_env -d mssqlao -cluster -hostenv e
Appliance Env. name Database Group Type SourceDB Parent snapshot Used [GB] Status Enabled Unique Name Parent time VDB creation time VDB refresh time Host list
-------------------- -------------------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ---------- ---------- ---------- ------------------------------ ----------------------------------- ----------------------------------- ----------------------------------- -----------------------------------
mssqlao dxrac DBOMSR1C571E Sources dSource N/A 1.67 RUNNING enabled DBOMSR1C571E N/A 2024-01-29 13:34:08 N/A host1.co;host2.co
mssqlao dxrac slon Sources VDB DBOMSR1C571E 2024-01-29 07:35:06 EST 1.37 INACTIVE enabled slon 2024-01-29 07:35:06 EST 2024-01-29 13:37:25 2024-01-29 13:37:33 host1.co;host2.co
mssqlao win19fleet-src SQL2019DB Untitled dSource N/A 0.01 UNKNOWN enabled N/A N/A 2023-12-21 02:30:12 N/A 10.43.81.230;10.43.81.205
Delphix