From 29607a529bc3fc16daa37a3d13d3d82e4095308c Mon Sep 17 00:00:00 2001 From: ShivanshGahlot Date: Mon, 27 Jan 2025 10:47:27 +0000 Subject: [PATCH 1/4] Removed ora2pg dependency in case of live migration in oracle and mysql --- yb-voyager/cmd/export.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/yb-voyager/cmd/export.go b/yb-voyager/cmd/export.go index 7e7488f4c..7d2067758 100644 --- a/yb-voyager/cmd/export.go +++ b/yb-voyager/cmd/export.go @@ -408,12 +408,17 @@ func checkDependenciesForExport() (binaryCheckIssues []string, err error) { missingTools = utils.CheckTools("strings") case MYSQL: - // TODO: For mysql and oracle, we can probably remove the ora2pg check in case it is a live migration - // Issue Link: https://github.com/yugabyte/yb-voyager/issues/2102 - missingTools = utils.CheckTools("ora2pg") + // In case if it is not a live migration, then we need to check for ora2pg + if !changeStreamingIsEnabled(exportType) && !useDebezium { + missingTools = utils.CheckTools("ora2pg") + } case ORACLE: - missingTools = utils.CheckTools("ora2pg", "sqlplus") + // In case if it is not a live migration, then we need to check for ora2pg + if !changeStreamingIsEnabled(exportType) && !useDebezium { + missingTools = utils.CheckTools("ora2pg") + } + missingTools = utils.CheckTools("sqlplus") case YUGABYTEDB: missingTools = utils.CheckTools("strings") From a07b1688cdb733e88c253494d1ac3762e83b2ddc Mon Sep 17 00:00:00 2001 From: ShivanshGahlot Date: Fri, 31 Jan 2025 09:30:24 +0000 Subject: [PATCH 2/4] Made the suggested changes --- yb-voyager/cmd/export.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yb-voyager/cmd/export.go b/yb-voyager/cmd/export.go index 7d2067758..e149372d5 100644 --- a/yb-voyager/cmd/export.go +++ b/yb-voyager/cmd/export.go @@ -409,13 +409,13 @@ func checkDependenciesForExport() (binaryCheckIssues []string, err error) { case MYSQL: // In case if it is not a live migration, then we need to check for ora2pg - if !changeStreamingIsEnabled(exportType) && !useDebezium { + if !(changeStreamingIsEnabled(exportType) || useDebezium) { missingTools = utils.CheckTools("ora2pg") } case ORACLE: // In case if it is not a live migration, then we need to check for ora2pg - if !changeStreamingIsEnabled(exportType) && !useDebezium { + if !(changeStreamingIsEnabled(exportType) || !useDebezium) { missingTools = utils.CheckTools("ora2pg") } missingTools = utils.CheckTools("sqlplus") From 90082b289a12c5357e571af72f093dd27566c983 Mon Sep 17 00:00:00 2001 From: ShivanshGahlot Date: Fri, 31 Jan 2025 09:30:51 +0000 Subject: [PATCH 3/4] Made the suggested changes --- yb-voyager/cmd/export.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yb-voyager/cmd/export.go b/yb-voyager/cmd/export.go index e149372d5..b43f83807 100644 --- a/yb-voyager/cmd/export.go +++ b/yb-voyager/cmd/export.go @@ -415,7 +415,7 @@ func checkDependenciesForExport() (binaryCheckIssues []string, err error) { case ORACLE: // In case if it is not a live migration, then we need to check for ora2pg - if !(changeStreamingIsEnabled(exportType) || !useDebezium) { + if !(changeStreamingIsEnabled(exportType) || useDebezium) { missingTools = utils.CheckTools("ora2pg") } missingTools = utils.CheckTools("sqlplus") From 5b19c38032ea77079e005f6406fb82e40b0afb23 Mon Sep 17 00:00:00 2001 From: ShivanshGahlot Date: Fri, 31 Jan 2025 09:54:32 +0000 Subject: [PATCH 4/4] Made the suggested changes --- yb-voyager/cmd/export.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yb-voyager/cmd/export.go b/yb-voyager/cmd/export.go index b43f83807..da26246af 100644 --- a/yb-voyager/cmd/export.go +++ b/yb-voyager/cmd/export.go @@ -416,9 +416,10 @@ func checkDependenciesForExport() (binaryCheckIssues []string, err error) { case ORACLE: // In case if it is not a live migration, then we need to check for ora2pg if !(changeStreamingIsEnabled(exportType) || useDebezium) { - missingTools = utils.CheckTools("ora2pg") + missingTools = utils.CheckTools("ora2pg", "sqlplus") + } else { + missingTools = utils.CheckTools("sqlplus") } - missingTools = utils.CheckTools("sqlplus") case YUGABYTEDB: missingTools = utils.CheckTools("strings")