Skip to content

Commit 7983db1

Browse files
author
Marcin Przepiorowski
committed
Merge branch 'postgresql' into develop
2 parents 8a6cab3 + 11650f2 commit 7983db1

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

bin/dx_provision_vdb.pl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
my $version = $Toolkit_helpers::version;
5252

5353
my $archivelog = 'yes';
54+
my $datapatch = 'no';
5455

5556
GetOptions(
5657
'help|?' => \(my $help),
@@ -123,6 +124,7 @@
123124
'tdecdbpassword=s' => \(my $tdecdbpassword),
124125
'tdekeyid=s' => \(my $tdekeyid),
125126
'customparameters=s@' => \(my $customparameters),
127+
'datapatch=s' => \($datapatch),
126128
'dever=s' => \(my $dever),
127129
'debug:n' => \(my $debug),
128130
'all' => (\my $all),
@@ -557,7 +559,15 @@
557559
$db->setNewDBID();
558560
}
559561

560-
562+
if (defined($datapatch)) {
563+
if ((lc $datapatch ne 'no') || ( lc $datapatch eq 'yes') ) {
564+
$db->setDataPatch($datapatch);
565+
} else {
566+
print "Datapatch argument should be yes or no. VDB won't be created\n" ;
567+
$ret = $ret + 1;
568+
next;
569+
}
570+
}
561571

562572
if ( defined($template) ) {
563573
if ( $db->setTemplate($template) ) {

lib/Bookmark_obj.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ sub createBookmark
217217
$bookmark_timeflow_type = 'AppDataTimeflowPoint'
218218
} elsif ($db->getDBType() eq 'vFiles') {
219219
$bookmark_timeflow_type = 'AppDataTimeflowPoint'
220+
} elsif ($db->getDBType() eq 'postgresql') {
221+
$bookmark_timeflow_type = 'AppDataTimeflowPoint'
220222
} else {
221223
print "Can't determine a DB type. Exiting\n";
222224
return 1;

lib/OracleVDB_obj.pm

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,11 @@ sub getConfig
318318
$config = join($joinsep,($config, $tde));
319319
}
320320

321+
my $datapatch = $self->getDataPatch();
322+
if (defined($datapatch)) {
323+
$config = join($joinsep,($config, "-datapatch $datapatch"));
324+
}
325+
321326

322327
} else {
323328
# dSource config for Oracle
@@ -1066,6 +1071,47 @@ sub setMountPoint {
10661071
$self->{"NEWDB"}->{"source"}->{"mountBase"} = $mountpoint;
10671072
}
10681073

1074+
1075+
# Procedure getDataPatch
1076+
# parameters:
1077+
# Get mountpoint of DB.
1078+
1079+
sub getDataPatch {
1080+
my $self = shift;
1081+
logger($self->{_debug}, "Entering OracleVDB_obj::getDataPatch",1);
1082+
my $ret;
1083+
if (version->parse($self->{_dlpxObject}->getApi()) >= version->parse(1.11.26)) {
1084+
if ($self->{"source"}->{"invokeDatapatch"}) {
1085+
$ret = "yes";
1086+
} else {
1087+
$ret = "no";
1088+
}
1089+
}
1090+
return $ret;
1091+
}
1092+
1093+
# Procedure setDataPatch
1094+
# parameters:
1095+
# - mountpoint - mount point
1096+
# Set mountpoint for new db.
1097+
1098+
sub setDataPatch {
1099+
my $self = shift;
1100+
my $datapatch = shift;
1101+
logger($self->{_debug}, "Entering OracleVDB_obj::setDataPatch",1);
1102+
1103+
if (version->parse($self->{_dlpxObject}->getApi()) >= version->parse(1.11.26)) {
1104+
# only for 15 and higher
1105+
if (lc $datapatch eq 'no') {
1106+
$self->{"NEWDB"}->{"source"}->{"invokeDatapatch"} = JSON::false;
1107+
}
1108+
elsif (lc $datapatch eq 'yes') {
1109+
$self->{"NEWDB"}->{"source"}->{"invokeDatapatch"} = JSON::true;
1110+
}
1111+
}
1112+
}
1113+
1114+
10691115
# Procedure setArchivelog
10701116
# parameters:
10711117
# - archivelog - type

0 commit comments

Comments
 (0)