-
Notifications
You must be signed in to change notification settings - Fork 36
dx_get_db_env
Marcin Przepiorowski edited this page Mar 21, 2019
·
12 revisions
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 ]
[-save]
[-masking]
[-parentlast l|p]
[-config]
[-backup path]
[-hostenv h|e]
[-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
- -rdbms oracle|sybase|db2|mssql|vFiles Filter by RDBMS type - this filter is implemented only in dx_get_db_env
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
- -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
- -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 )
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
Delphix