|
84 | 84 | 'presync=s@' =>\(my $presync),
|
85 | 85 | 'postsync=s@' =>\(my $postsync),
|
86 | 86 | '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), |
87 | 92 | 'dever=s' => \(my $dever),
|
88 | 93 | 'debug:n' => \(my $debug),
|
89 | 94 | 'all' => (\my $all),
|
|
140 | 145 | exit (1);
|
141 | 146 | }
|
142 | 147 |
|
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) ) ) ) { |
144 | 157 | print "Options -sourcename, -dsourcename, -group, -source_os_user are required. \n";
|
145 | 158 | pod2usage(-verbose => 1, -input=>\*DATA);
|
146 | 159 | exit (1);
|
|
207 | 220 |
|
208 | 221 | if (((lc $action eq 'attach') || (lc $action eq 'create')) && (( lc $type ne 'db2' ) && ( lc $type ne 'vfiles' ) && (! ( defined($dbuser) && defined($password) ) ) ) ) {
|
209 | 222 | # 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 | + } |
222 | 237 | }
|
223 | 238 | }
|
224 | 239 |
|
|
308 | 323 | my $source = ($databases->getDB($source_ref->[0]));
|
309 | 324 |
|
310 | 325 | 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); |
312 | 327 | } 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); |
314 | 329 | }
|
315 | 330 |
|
316 | 331 |
|
|
357 | 372 | $ret = $ret + 1;
|
358 | 373 | last;
|
359 | 374 | }
|
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 | + } |
361 | 380 | }
|
362 | 381 | elsif ($type eq 'sybase') {
|
363 | 382 | my $db = new SybaseVDB_obj($engine_obj,$debug);
|
|
373 | 392 | $ret = $ret + 1;
|
374 | 393 | last;
|
375 | 394 | }
|
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); |
377 | 396 | }
|
378 | 397 | elsif ($type eq 'vFiles') {
|
379 | 398 | my $db = new AppDataVDB_obj($engine_obj,$debug);
|
@@ -440,7 +459,7 @@ sub addhooks {
|
440 | 459 | };
|
441 | 460 | close $FD;
|
442 | 461 |
|
443 |
| - if ($loadedHooks->{type} ne 'LinkedSourceOperations') { |
| 462 | + if (($loadedHooks->{type} ne 'LinkedSourceOperations') && ($loadedHooks->{type} ne 'OracleLinkedSourceOperations') ){ |
444 | 463 | print '$hooks is not a export file from dx_get_dbhooks\n' ;
|
445 | 464 | return 1;
|
446 | 465 | }
|
@@ -487,6 +506,8 @@ =head1 SYNOPSIS
|
487 | 506 | [-hooks path_to_hooks]
|
488 | 507 | [-presync [hookname,]template|filename[,OS_shell] ]
|
489 | 508 | [-postsync [hookname,]template|filename[,OS_shell] ]
|
| 509 | + [-stagingpush] |
| 510 | + [-oracledbtype nonmt|cdb|pdb] |
490 | 511 | [-debug ]
|
491 | 512 | [-version ]
|
492 | 513 | [-help|? ]
|
@@ -615,6 +636,16 @@ =head2 dSource arguments
|
615 | 636 | =item B<-commstagingclient Commvault staging name>
|
616 | 637 | Commvault staging name
|
617 | 638 |
|
| 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 | +
|
618 | 649 | =item B<-hadr hadrPrimarySVC:XXX,hadrPrimaryHostname:hostname,hadrStandbySVC:YYY>
|
619 | 650 | Add DB2 dSource with HADR support
|
620 | 651 | Parameter hadrTargetList is optional.
|
|
0 commit comments