def page_activated(self, advancing):
        if advancing and self.main.plan.state.dataBulkTransferParams[
                "tableList"]:
            options = self.main.plan.state.dataBulkTransferParams
            copy_script = options.get("GenerateCopyScript", None)
            bulk_copy_script = options.get("GenerateBulkCopyScript", None)

            self.add_task(self._prepare_copy,
                          "Prepare information for data copy",
                          "Prepare Information for Data Copy")
            if copy_script != None:
                self._copy_script_task = self.add_task(
                    self._create_copy_script,
                    "Create shell script for data copy",
                    "Create Shell Script for Data Copy")

            if bulk_copy_script != None:
                self._bulk_copy_script_task = self.add_task(
                    self._create_bulk_copy_script,
                    "Create shell script for bulk data copy",
                    "Create Shell Script for Bulk Data Copy")

            if options.get("LiveDataCopy", False) or options.get(
                    "GenerateDumpScript", False):
                self._migrate_task1 = self.add_threaded_task(
                    self._count_rows, "Determine number of rows to copy",
                    "Determine number of rows to copy")
                self._migrate_task2 = self.add_threaded_task(
                    self._migrate_data, "Copy data to target RDBMS",
                    "Copy data to target RDBMS")

            self._migrating_data = False
            self._progress_per_table = {}

            if options.get("LiveDataCopy", False):
                source_password = self.main.plan.migrationSource.password
                if source_password is None:
                    source_password = request_password(
                        self.main.plan.migrationSource.connection)
                target_password = self.main.plan.migrationTarget.password
                if target_password is None:
                    if self.main.plan.migrationTarget.connection.hostIdentifier == self.main.plan.migrationSource.connection.hostIdentifier:
                        if self.main.plan.migrationTarget.connection.parameterValues[
                                'userName'] == self.main.plan.migrationSource.connection.parameterValues[
                                    'userName']:
                            target_password = source_password
                if target_password is None:
                    target_password = request_password(
                        self.main.plan.migrationTarget.connection)
            else:
                source_password = None
                target_password = None

            self._transferer = DataMigrator(
                self, self.main.plan.state.dataBulkTransferParams,
                self.main.plan.migrationSource.connection, source_password,
                self.main.plan.migrationTarget.connection, target_password)

            self._transferer.copytable_path = self.main.plan.wbcopytables_path_bin
        WizardProgressPage.page_activated(self, advancing)
    def page_activated(self, advancing):
        if advancing:
            options = self.main.plan.state.dataBulkTransferParams
            copy_script = options.get("GenerateCopyScript", None)
            bulk_copy_script = options.get("GenerateBulkCopyScript", None)

            self.add_task(self._prepare_copy, "Prepare information for data copy")
            if copy_script != None:
                self._copy_script_task = self.add_task(self._create_copy_script, "Create shell script for data copy")

            if bulk_copy_script != None:
                self._bulk_copy_script_task = self.add_task(
                    self._create_bulk_copy_script, "Create shell script for bulk data copy"
                )

            if options.get("LiveDataCopy", False) or options.get("GenerateDumpScript", False):
                self._migrate_task1 = self.add_threaded_task(self._count_rows, "Determine number of rows to copy")
                self._migrate_task2 = self.add_threaded_task(self._migrate_data, "Copy data to target RDBMS")

            self._migrating_data = False
            self._progress_per_table = {}

            if options.get("LiveDataCopy", False):
                source_password = self.main.plan.migrationSource.password
                if source_password is None:
                    source_password = request_password(self.main.plan.migrationSource.connection)
                target_password = self.main.plan.migrationTarget.password
                if target_password is None:
                    if (
                        self.main.plan.migrationTarget.connection.hostIdentifier
                        == self.main.plan.migrationSource.connection.hostIdentifier
                    ):
                        if (
                            self.main.plan.migrationTarget.connection.parameterValues["userName"]
                            == self.main.plan.migrationSource.connection.parameterValues["userName"]
                        ):
                            target_password = source_password
                if target_password is None:
                    target_password = request_password(self.main.plan.migrationTarget.connection)
            else:
                source_password = None
                target_password = None

            self._transferer = DataMigrator(
                self,
                self.main.plan.state.dataBulkTransferParams,
                self.main.plan.migrationSource.connection,
                source_password,
                self.main.plan.migrationTarget.connection,
                target_password,
            )

            self._transferer.copytable_path = self.main.plan.wbcopytables_path
        WizardProgressPage.page_activated(self, advancing)
    def page_activated(self, advancing):
        WizardProgressPage.page_activated(self, advancing)
        if advancing:
            if self.main.plan.state.objectCreationParams.get("CreateSQLFile", ""):
                self._script_task.set_enabled(True)
            else:
                self._script_task.set_enabled(False)

            if self.main.plan.state.objectCreationParams.get("CreateInDB", True):
                self._db_task1.set_enabled(True)
                self._db_task2.set_enabled(True)
                self._db_task3.set_enabled(True)
            else:
                self._db_task1.set_enabled(False)
                self._db_task2.set_enabled(False)
                self._db_task3.set_enabled(False)
Exemplo n.º 4
0
    def page_activated(self, advancing):
        WizardProgressPage.page_activated(self, advancing)
        if advancing:
            if self.main.plan.state.objectCreationParams.get("CreateSQLFile", ""):
                self._script_task.set_enabled(True)
            else:
                self._script_task.set_enabled(False)

            if self.main.plan.state.objectCreationParams.get("CreateInDB", True):
                self._db_task1.set_enabled(True)
                self._db_task2.set_enabled(True)
                self._db_task3.set_enabled(True)
            else:
                self._db_task1.set_enabled(False)
                self._db_task2.set_enabled(False)
                self._db_task3.set_enabled(False)
    def page_activated(self, advancing):
        if advancing:
            options = self.main.plan.state.dataBulkTransferParams
            copy_script = options.get("GenerateCopyScript", None)
            self._copy_script_task.set_enabled(copy_script != None)
            if options.get("LiveDataCopy", False) or options.get(
                    "GenerateDumpScript", False):
                self._migrate_task1.set_enabled(True)
                self._migrate_task2.set_enabled(True)
            else:
                self._migrate_task1.set_enabled(False)
                self._migrate_task2.set_enabled(False)

            self._migrating_data = False
            self._progress_per_table = {}

            if options.get("LiveDataCopy", False):
                source_password = self.main.plan.migrationSource.password
                if source_password is None:
                    source_password = request_password(
                        self.main.plan.migrationSource.connection)
                target_password = self.main.plan.migrationTarget.password
                if target_password is None:
                    if self.main.plan.migrationTarget.connection.hostIdentifier == self.main.plan.migrationSource.connection.hostIdentifier:
                        if self.main.plan.migrationTarget.connection.parameterValues[
                                'userName'] == self.main.plan.migrationSource.connection.parameterValues[
                                    'userName']:
                            target_password = source_password
                if target_password is None:
                    target_password = request_password(
                        self.main.plan.migrationTarget.connection)
            else:
                source_password = None
                target_password = None

            self._transferer = DataMigrator(
                self, self.main.plan.state.dataBulkTransferParams,
                self.main.plan.migrationSource.connection, source_password,
                self.main.plan.migrationTarget.connection, target_password)

            self._transferer.copytable_path = self.main.plan.wbcopytables_path
        WizardProgressPage.page_activated(self, advancing)
    def page_activated(self, advancing):
        if advancing:
            options = self.main.plan.state.dataBulkTransferParams
            copy_script = options.get("GenerateCopyScript", None)
            self._copy_script_task.set_enabled(copy_script != None)
            if options.get("LiveDataCopy", False) or options.get("GenerateDumpScript", False):
                self._migrate_task1.set_enabled(True)
                self._migrate_task2.set_enabled(True)
            else:
                self._migrate_task1.set_enabled(False)
                self._migrate_task2.set_enabled(False)

            self._migrating_data = False
            self._progress_per_table = {}

            if options.get("LiveDataCopy", False):
                source_password = self.main.plan.migrationSource.password
                if source_password is None:
                    source_password = request_password(self.main.plan.migrationSource.connection)
                target_password = self.main.plan.migrationTarget.password
                if target_password is None:
                    if self.main.plan.migrationTarget.connection.hostIdentifier == self.main.plan.migrationSource.connection.hostIdentifier:
                        if self.main.plan.migrationTarget.connection.parameterValues['userName'] == self.main.plan.migrationSource.connection.parameterValues['userName']:
                            target_password = source_password
                if target_password is None:
                    target_password = request_password(self.main.plan.migrationTarget.connection)
            else:
                source_password = None
                target_password = None

            self._transferer = DataMigrator(self, self.main.plan.state.dataBulkTransferParams,
                          self.main.plan.migrationSource.connection, source_password,
                          self.main.plan.migrationTarget.connection, target_password)

            self._transferer.copytable_path = self.main.plan.wbcopytables_path
        WizardProgressPage.page_activated(self, advancing)