119
119
my $timeflows_parent ;
120
120
my $groups_parent ;
121
121
my $engine_parent ;
122
+ my $replication_parent ;
122
123
123
124
if (defined ($parent_engine )) {
124
125
132
133
133
134
$snapshots_parent = new Snapshot_obj($engine_parent , undef , undef , $debug );
134
135
$timeflows_parent = new Timeflow_obj($engine_parent , $debug );
136
+ $replication_parent = new Replication_obj ($engine_parent , $debug );
135
137
}
136
138
137
139
155
157
156
158
157
159
if (defined ($parent_engine )) {
158
- $object_map = $databases -> {_namespace }-> generate_replicate_mapping($engine_parent , $timeflows_parent );
160
+ $object_map = $databases -> {_namespace }-> generate_replicate_mapping($engine_parent , $timeflows_parent , $replication_parent );
159
161
}
160
162
161
163
@@ -307,6 +309,7 @@ =head1 SYNOPSIS
307
309
308
310
dx_get_hierarchy [-engine|d <delphix identifier> | -all ]
309
311
[-group group_name | -name db_name | -host host_name | -type dsource|vdb | -instancename instname]
312
+ [-parent_engine <delphix identifier>]
310
313
[-printhierarchy]
311
314
[-format csv|json ]
312
315
[-help|? ] [ -debug ]
@@ -373,6 +376,9 @@ =head1 OPTIONS
373
376
374
377
=over 3
375
378
379
+ =item B<-parent_engine delphix identifier >
380
+ When replication between engines is configured, specify a parent engine to the engine from -d parameter.
381
+
376
382
=item B<-printhierarchy >
377
383
Display a hierarchy of databases (from VDB to dSource)
378
384
@@ -391,9 +397,65 @@ =head1 OPTIONS
391
397
392
398
=back
393
399
400
+ =head1 Output columns
401
+
402
+ dS snapshot - time of dSource snapshot used to create/refresh a VDB. If there is a chain of VDB's it's a snapshot used to create first one
403
+ Physical DB - name of physical database used to create dSource
404
+ First child DB - name of first VDB in chain.
405
+
394
406
=head1 EXAMPLES
395
407
408
+ Print database hierarchy on single engine
409
+
410
+ dx_get_hierarchy -d Landshark51
411
+
412
+ Appliance Database Group Type dSource dS snapshot Physical DB First child DB
413
+ ---------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ------------------------------ ------------------------------
414
+ Landshark5 autotest Analytics VDB Oracle dsource 2017-02-08 09:00:35 EST orcl autotest
415
+ Landshark5 AdventureWorksLT2008R2 Sources dSource N/A AdventureWorksLT2008R2 N/A
416
+ Landshark5 Oracle dsource Sources dSource N/A orcl N/A
417
+ Landshark5 racdba Sources dSource N/A racdba N/A
418
+ Landshark5 Sybase dsource Sources dSource N/A pubs3 N/A
419
+
420
+
421
+ Print database hierarchy on replication target engine
422
+
423
+ dx_get_hierarchy -d Delphix33
424
+
425
+ Appliance Database Group Type dSource dS snapshot Physical DB First child DB
426
+ ---------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ------------------------------ ------------------------------
427
+ Delphix33 racdb@delphix32-2 Sources@delphix dSource N/A racdb N/A
428
+ Delphix33 mask1@delphix32-4 Test@delphix32- VDB dSource on other DE N/A N/A N/A
429
+ Delphix33 maskedms@delphix32-4 Test@delphix32- VDB dSource on other DE N/A N/A N/A
430
+ Delphix33 cloneMSmas Untitled VDB dSource on other DE N/A N/A N/A
431
+ Delphix33 mask1clone Untitled VDB dSource on other DE N/A N/A N/A
432
+ Delphix33 maskclone Untitled VDB parent deleted N/A N/A N/A
433
+ Delphix33 Vracdb_70C Untitled VDB racdb@delphix32-2 2016-09-28 14:57:16 GMT racdb Vracdb_70C
434
+
435
+ Print database hierarchy on replication target engine with connection to replication source
436
+
437
+ dx_get_hierarchy -d Delphix33 -parent_engine Delphix32
438
+
439
+ Appliance Database Group Type dSource dS snapshot Physical DB First child DB
440
+ ---------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ------------------------------ ------------------------------
441
+ Delphix33 racdb@delphix32-2 Sources@delphix dSource N/A racdb N/A
442
+ Delphix33 mask1@delphix32-4 Test@delphix32- VDB test1 2017-01-30 13:02:53 GMT test1 man
443
+ Delphix33 maskedms@delphix32-4 Test@delphix32- VDB tpcc 2017-02-03 12:05:15 GMT tpcc maskedms
444
+ Delphix33 cloneMSmas Untitled VDB tpcc 2017-02-03 12:05:15 GMT tpcc maskedms
445
+ Delphix33 mask1clone Untitled VDB test1 2017-01-30 09:15:28 GMT test1 man
446
+ Delphix33 maskclone Untitled VDB parent deleted N/A N/A N/A
447
+ Delphix33 Vracdb_70C Untitled VDB racdb@delphix32-2 2016-09-28 14:57:16 GMT racdb Vracdb_70C
448
+
449
+ Print database hierarchy chain starting with VDB up to dSource
450
+
451
+ dx_get_hierarchy -d Delphix33 -parent_engine Delphix32 -printhierarchy
452
+ Delphix33 : racdb@delphix32-2
453
+ Delphix33 : mask1@delphix32-4 --> mask1 --> man --> test1
454
+ Delphix33 : maskedms@delphix32-4 --> maskedms --> tpcc
455
+ Delphix33 : cloneMSmas --> maskedms@delphix32-4 --> maskedms --> tpcc
456
+ Delphix33 : mask1clone --> mask1@delphix32-4
457
+ Delphix33 : maskclone
458
+ Delphix33 : Vracdb_70C --> racdb@delphix32-2
396
459
397
-
398
460
399
461
=cut
0 commit comments