Skip to content

Commit 0d62ef7

Browse files
author
Marcin Przepiorowski
committed
fix for detach dsource
1 parent 36e85d2 commit 0d62ef7

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

bin/dx_ctl_dsource.pl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189

190190
if ((lc $action eq 'detach') || (lc $action eq 'update')) {
191191
my $databases = new Databases($engine_obj,$debug);
192+
192193
my $source_ref = Toolkit_helpers::get_dblist_from_filter(undef, $group, undef, $dsourcename, $databases, $groups, undef, undef, undef, undef, undef, undef, $debug);
193194

194195
if (!defined($source_ref)) {
@@ -203,15 +204,12 @@
203204

204205
# only for sybase and mssql
205206
my $type = $source->getDBType();
206-
207-
if (($type eq 'sybase') || ($type eq 'mssql')) {
208-
if ($action eq 'detach') {
209-
$jobno = $source->detach_dsource();
210-
} elsif ($action eq 'update') {
211-
$jobno = $source->update_dsource($backup_dir, $logsync, $validatedsync);
212-
}
213-
$ret = $ret + Toolkit_helpers::waitForAction($engine_obj, $jobno, "Action completed with success", "There were problems with dSource action");
207+
if ($action eq 'detach') {
208+
$jobno = $source->detach_dsource();
209+
} elsif (($type eq 'sybase') || ($type eq 'mssql')) {
210+
$jobno = $source->update_dsource($backup_dir, $logsync, $validatedsync);
214211
}
212+
$ret = $ret + Toolkit_helpers::waitForAction($engine_obj, $jobno, "Action completed with success", "There were problems with dSource action");
215213
}
216214

217215
} elsif ($action eq 'attach') {

0 commit comments

Comments
 (0)