Skip to content

Commit e6dcc5b

Browse files
author
Marcin Przepiorowski
committed
v2.4.20
2 parents e56d224 + e80dad1 commit e6dcc5b

File tree

9 files changed

+612
-230
lines changed

9 files changed

+612
-230
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030
- name: add examples
3131
run: |
3232
gzip -d dxtoolkit.tar.gz
33-
tar -rvf dxtoolkit.tar bin/dxtools.conf.example bin/dxusers.csv.example
33+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
34+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
35+
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
3436
gzip dxtoolkit.tar
3537
3638
- name: compress toolkit
@@ -97,7 +99,9 @@ jobs:
9799
- name: add examples
98100
run: |
99101
gzip -d dxtoolkit.tar.gz
100-
tar -rvf dxtoolkit.tar bin/dxtools.conf.example bin/dxusers.csv.example
102+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
103+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
104+
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
101105
gzip dxtoolkit.tar
102106
103107
- name: compress toolkit
@@ -135,7 +139,9 @@ jobs:
135139
- name: add examples
136140
run: |
137141
gzip -d dxtoolkit.tar.gz
138-
tar -rvf dxtoolkit.tar bin/dxtools.conf.example bin/dxusers.csv.example
142+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
143+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
144+
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
139145
gzip dxtoolkit.tar
140146
141147
@@ -180,7 +186,9 @@ jobs:
180186
- name: add examples
181187
run: |
182188
gzip -d dxtoolkit.tar.gz
183-
tar -rvf dxtoolkit.tar bin/dxtools.conf.example bin/dxusers.csv.example
189+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
190+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
191+
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
184192
gzip dxtoolkit.tar
185193
186194
- name: compress toolkit

.github/workflows/develop.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
run: |
4747
ls -l
4848
gzip -d dxtoolkit.tar.gz
49-
cp bin/dxtools.conf.example bin/dxusers.csv.example dxtoolkit2
49+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
50+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
5051
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
5152
gzip dxtoolkit.tar
5253
@@ -141,7 +142,8 @@ jobs:
141142
- name: add examples
142143
run: |
143144
gzip -d dxtoolkit.tar.gz
144-
cp bin/dxtools.conf.example bin/dxusers.csv.example dxtoolkit2
145+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
146+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
145147
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
146148
gzip dxtoolkit.tar
147149
@@ -195,7 +197,8 @@ jobs:
195197
- name: add examples
196198
run: |
197199
gzip -d dxtoolkit.tar.gz
198-
cp bin/dxtools.conf.example bin/dxusers.csv.example dxtoolkit2
200+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
201+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
199202
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
200203
gzip dxtoolkit.tar
201204
@@ -250,7 +253,8 @@ jobs:
250253
- name: add examples
251254
run: |
252255
gzip -d dxtoolkit.tar.gz
253-
cp bin/dxtools.conf.example bin/dxusers.csv.example dxtoolkit2
256+
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
257+
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
254258
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
255259
gzip dxtoolkit.tar
256260

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 2.4.20
2+
3+
### Added
4+
- support for Staging push ( MS SQL / Oracle )
5+
- [bug #332](https://github.com/delphix/dxtoolkit/issues/232) - dx_snapshot_db supports staging push
6+
7+
### Changes:
8+
- [bug #230](https://github.com/delphix/dxtoolkit/issues/232) - example files location
9+
- compability with new engines (up to 12)
10+
111
## 2.4.19.2
212

313
### Added

bin/dx_ctl_dsource.pl

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@
8484
'presync=s@' =>\(my $presync),
8585
'postsync=s@' =>\(my $postsync),
8686
'hooks=s' => \(my $hooks),
87+
'stagingpush' => \(my $stagingpush),
88+
'instname=s' => \(my $instname),
89+
'uniqname=s' => \(my $uniqname),
90+
'template=s' => \(my $template),
91+
'oracledbtype=s' => \(my $oracledbtype),
8792
'dever=s' => \(my $dever),
8893
'debug:n' => \(my $debug),
8994
'all' => (\my $all),
@@ -140,7 +145,15 @@
140145
exit (1);
141146
}
142147

143-
if ( ( lc $type ne 'db2' ) && ( ! ( defined($type) && defined($sourcename) && defined($dsourcename) && defined($source_os_user) && defined($group) ) ) ) {
148+
149+
if (defined($stagingpush)) {
150+
if (! defined($group)) {
151+
print "For staging push -group is required. \n";
152+
pod2usage(-verbose => 1, -input=>\*DATA);
153+
exit (1);
154+
}
155+
}
156+
elsif ( ( lc $type ne 'db2' ) && ( ! ( defined($type) && defined($sourcename) && defined($dsourcename) && defined($source_os_user) && defined($group) ) ) ) {
144157
print "Options -sourcename, -dsourcename, -group, -source_os_user are required. \n";
145158
pod2usage(-verbose => 1, -input=>\*DATA);
146159
exit (1);
@@ -207,18 +220,20 @@
207220

208221
if (((lc $action eq 'attach') || (lc $action eq 'create')) && (( lc $type ne 'db2' ) && ( lc $type ne 'vfiles' ) && (! ( defined($dbuser) && defined($password) ) ) ) ) {
209222
# no db user exceptions
210-
if (( lc $type eq 'mssql' ) && ( lc $dbusertype eq 'environment' ) ) {
211-
$dbuser = $source_os_user;
212-
} elsif (lc $type eq 'oracle') {
213-
if ( ! (version->parse($engine_obj->getApi()) >= version->parse(1.11.7) ) ) {
214-
print "Options -dbuser and -password are required for Oracle for version lower than 6.0.7 \n";
215-
pod2usage(-verbose => 1, -input=>\*DATA);
216-
exit (1)
217-
}
218-
} else {
219-
print "Options -dbuser and -password are required for non vFiles dsources. \n";
220-
pod2usage(-verbose => 1, -input=>\*DATA);
221-
exit (1);
223+
if (!defined($stagingpush)) {
224+
if (( lc $type eq 'mssql' ) && ( lc $dbusertype eq 'environment' ) ) {
225+
$dbuser = $source_os_user;
226+
} elsif (lc $type eq 'oracle') {
227+
if ( ! (version->parse($engine_obj->getApi()) >= version->parse(1.11.7) ) ) {
228+
print "Options -dbuser and -password are required for Oracle for version lower than 6.0.7 \n";
229+
pod2usage(-verbose => 1, -input=>\*DATA);
230+
exit (1)
231+
}
232+
} else {
233+
print "Options -dbuser and -password are required for non vFiles dsources. \n";
234+
pod2usage(-verbose => 1, -input=>\*DATA);
235+
exit (1);
236+
}
222237
}
223238
}
224239

@@ -308,9 +323,9 @@
308323
my $source = ($databases->getDB($source_ref->[0]));
309324

310325
if ( $type eq 'oracle' ) {
311-
$jobno = $source->attach_dsource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$cdbcont);
326+
$jobno = $source->attach_dsource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$cdbcont, $stagingpush);
312327
} else {
313-
$jobno = $source->attach_dsource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$stageenv,$stageinst,$stage_os_user, $backup_dir, $validatedsync, $delphixmanaged, $compression, $dbusertype);
328+
$jobno = $source->attach_dsource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$stageenv,$stageinst,$stage_os_user, $backup_dir, $validatedsync, $delphixmanaged, $compression, $dbusertype, $stagingpush);
314329
}
315330

316331

@@ -357,7 +372,11 @@
357372
$ret = $ret + 1;
358373
last;
359374
}
360-
$jobno = $db->addSource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$dsourcename,$group,$logsync, $cdbcont);
375+
if (defined($stagingpush)) {
376+
$jobno = $db->addSource($sourcename,$stageinst,$stageenv,$stage_os_user,undef, undef, $dsourcename, $group, $logsync, $cdbcont, $stagingpush, $instname, $uniqname, $template, $oracledbtype, $mountbase);
377+
} else {
378+
$jobno = $db->addSource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$dsourcename,$group,$logsync, $cdbcont, $stagingpush);
379+
}
361380
}
362381
elsif ($type eq 'sybase') {
363382
my $db = new SybaseVDB_obj($engine_obj,$debug);
@@ -373,7 +392,7 @@
373392
$ret = $ret + 1;
374393
last;
375394
}
376-
$jobno = $db->addSource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$dsourcename,$group,$logsync,$stageenv,$stageinst,$stage_os_user, $backup_dir, $dumppwd, $validatedsync, $delphixmanaged, $compression, $dbusertype, \%commvault);
395+
$jobno = $db->addSource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$dsourcename,$group,$logsync,$stageenv,$stageinst,$stage_os_user, $backup_dir, $dumppwd, $validatedsync, $delphixmanaged, $compression, $dbusertype, \%commvault, $stagingpush);
377396
}
378397
elsif ($type eq 'vFiles') {
379398
my $db = new AppDataVDB_obj($engine_obj,$debug);
@@ -440,7 +459,7 @@ sub addhooks {
440459
};
441460
close $FD;
442461

443-
if ($loadedHooks->{type} ne 'LinkedSourceOperations') {
462+
if (($loadedHooks->{type} ne 'LinkedSourceOperations') && ($loadedHooks->{type} ne 'OracleLinkedSourceOperations') ){
444463
print '$hooks is not a export file from dx_get_dbhooks\n' ;
445464
return 1;
446465
}
@@ -487,6 +506,8 @@ =head1 SYNOPSIS
487506
[-hooks path_to_hooks]
488507
[-presync [hookname,]template|filename[,OS_shell] ]
489508
[-postsync [hookname,]template|filename[,OS_shell] ]
509+
[-stagingpush]
510+
[-oracledbtype nonmt|cdb|pdb]
490511
[-debug ]
491512
[-version ]
492513
[-help|? ]
@@ -615,6 +636,16 @@ =head2 dSource arguments
615636
=item B<-commstagingclient Commvault staging name>
616637
Commvault staging name
617638
639+
=item B<-stagingpush>
640+
Create dsource using staging push technology ( current support MS SQL )
641+
642+
=item B<-oracledbtype nonmt|cdb|pdb>
643+
Oracle staging push database type:
644+
645+
- nonmt - for Oracle non multitenant
646+
- cdb - for Oracle Container ( required before PDB )
647+
- pdb - for Oracle Pluggable database
648+
618649
=item B<-hadr hadrPrimarySVC:XXX,hadrPrimaryHostname:hostname,hadrStandbySVC:YYY>
619650
Add DB2 dSource with HADR support
620651
Parameter hadrTargetList is optional.

0 commit comments

Comments
 (0)