1. 首页 > IT综合教程 > 正文

ETL教程FG436-ETL升级与迁移

1. ETL升级与迁移概述

ETL(Extract, Transform, Load)工具的升级与迁移是确保数据集成系统持续稳定运行的重要环节。本文以Informatica
PowerCenter为例,详细介绍ETL系统的升级与迁移过程。更多学习教程www.fgedu.net.cn

# 检查当前Informatica版本
$ cd /opt/informatica/9.6.1/server/bin
$ ./pmcmd version

Informatica PowerCenter Command Line Program, version [9.6.1 HotFix 3]
Copyright (c) Informatica Corporation 1994 – 2026
All Rights Reserved.

Build Number: 161027
Build Date: Mon Oct 27 14:30:00 2026

生产环境风哥建议:ETL系统升级前需要进行充分的规划和测试,选择业务低峰期进行,确保升级过程对业务影响最小化。

2. 升级与迁移准备工作

升级与迁移前的准备工作是确保过程顺利进行的关键,包括环境检查、备份、测试环境准备等。学习交流加群风哥微信: itpux-com

# 检查系统环境
$ uname -a
Linux fgedu-etl 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2026 x86_64 x86_64 x86_64
GNU/Linux

# 检查磁盘空间
$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 32G 0 32G 0% /dev
tmpfs 32G 0 32G 0% /dev/shm
tmpfs 32G 8.5M 32G 1% /run
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/sda1 50G 15G 36G 30% /
/dev/sdb1 500G 120G 380G 24% /opt

# 检查内存
$ free -h
total used free shared buff/cache available
Mem: 62G 2.1G 58G 8.5M 1.8G 59G
Swap: 32G 0B 32G

风哥风哥提示:升级前应确保系统满足新版本ETL工具的硬件和软件要求,特别是内存和磁盘空间。

3. 版本兼容性检查

版本兼容性是升级成功的关键,需要检查当前版本与目标版本之间的兼容性,以及与其他系统的集成兼容性。

# 检查当前Informatica版本详细信息
$ cd /opt/informatica/9.6.1/server/bin
$ ./pmrep getversion

PowerCenter Repository Service Version: 9.6.1 HotFix 3
Build Number: 161027
Build Date: Mon Oct 27 14:30:00 2026

# 检查数据库兼容性(Oracle为例)
$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Thu Apr 3 10:00:00 2026
Version 19.3.0.0.0

SQL> SELECT * FROM v$version;
BANNER
——————————————————————————–
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0

4. 配置备份

在升级前,必须对ETL系统的配置、存储库和工作流进行完整备份,以便在出现问题时能够回滚。学习交流加群风哥QQ113257174

# 备份Informatica存储库
$ cd /opt/informatica/9.6.1/server/bin
$ ./pmrep connect -r REP1 -d DOMAIN1 -n Administrator -X Admin123
$ ./pmrep backup -f /backup/informatica_rep1_backup_20260403.xml

Backup completed successfully.

# 备份工作流和映射
$ ./pmrep objectexport -o workflow -n “*” -f /backup/informatica_workflows_20260403.xml
$ ./pmrep objectexport -o mapping -n “*” -f /backup/informatica_mappings_20260403.xml

Object export completed successfully.

# 备份配置文件
$ tar -czf /backup/informatica_config_20260403.tar.gz /opt/informatica/9.6.1/server/infa_shared/

# 验证备份文件
$ ls -la /backup/
total 102400
-rw-r–r– 1 informatica informatica 51200000 Apr 3 10:15 informatica_rep1_backup_20260403.xml
-rw-r–r– 1 informatica informatica 20480000 Apr 3 10:20 informatica_workflows_20260403.xml
-rw-r–r– 1 informatica informatica 15360000 Apr 3 10:25 informatica_mappings_20260403.xml
-rw-r–r– 1 informatica informatica 15360000 Apr 3 10:30 informatica_config_20260403.tar.gz

5. 升级执行

升级执行是整个过程的核心,需要按照厂商提供的升级指南逐步执行,确保每个步骤都正确完成。

# 停止Informatica服务
$ cd /opt/informatica/9.6.1/server/tomcat/bin
$ ./shutdown.sh

Using CATALINA_BASE: /opt/informatica/9.6.1/server/tomcat
Using CATALINA_HOME: /opt/informatica/9.6.1/server/tomcat
Using CATALINA_TMPDIR: /opt/informatica/9.6.1/server/tomcat/temp
Using JRE_HOME: /opt/informatica/9.6.1/java/jre
Using CLASSPATH:
/opt/informatica/9.6.1/server/tomcat/bin/bootstrap.jar:/opt/informatica/9.6.1/server/tomcat/bin/tomcat-juli.jar

# 运行升级安装程序
$ cd /tmp/informatica_10.2.0
$ ./install.sh

Preparing to install…
Extracting the JRE from the installer archive…
Starting Installer…

Welcome to the Informatica 10.2.0 Installation Wizard

Please choose an installation type:
1. Install Informatica Services
2. Install Informatica Client Tools
3. Install Informatica Server Tools
4. Upgrade from a previous version

Enter your choice: 4

# 按照安装向导完成升级过程
# 升级完成后启动服务
$ cd /opt/informatica/10.2.0/server/tomcat/bin
$ ./startup.sh

Using CATALINA_BASE: /opt/informatica/10.2.0/server/tomcat
Using CATALINA_HOME: /opt/informatica/10.2.0/server/tomcat
Using CATALINA_TMPDIR: /opt/informatica/10.2.0/server/tomcat/temp
Using JRE_HOME: /opt/informatica/10.2.0/java/jre
Using CLASSPATH:
/opt/informatica/10.2.0/server/tomcat/bin/bootstrap.jar:/opt/informatica/10.2.0/server/tomcat/bin/tomcat-juli.jar
Tomcat started.

生产环境风哥建议:升级过程中应密切关注安装日志,及时处理可能出现的错误,确保升级过程顺利完成。

6. 迁移策略

迁移策略包括工作流、映射、配置等的迁移,需要根据实际情况选择合适的迁移方法。更多学习教程公众号风哥教程itpux_com

# 连接到新的Repository Service
$ cd /opt/informatica/10.2.0/server/bin
$ ./pmrep connect -r REP1 -d DOMAIN1 -n Administrator -X Admin123

# 导入备份的工作流和映射
$ ./pmrep objectimport -f /backup/informatica_workflows_20260403.xml -o workflow -u

Import completed successfully. 15 workflows imported.

$ ./pmrep objectimport -f /backup/informatica_mappings_20260403.xml -o mapping -u

Import completed successfully. 25 mappings imported.

# 更新连接信息
$ ./pmrep updateconnection -n “Oracle_Connection” -t ORACLE -h oracle-db:1521 -d ORCL -u etl_user -p ******

Connection updated successfully.

7. 验证与测试

升级和迁移完成后,需要进行全面的验证和测试,确保ETL系统能够正常运行。

# 验证Informatica服务状态
$ cd /opt/informatica/10.2.0/server/bin
$ ./infacmd.sh isp ListServices -dn DOMAIN1 -un Administrator -pd Admin123

Service Name: IntegrationService
Service Type: Integration Service
Service Status: Running

Service Name: RepositoryService
Service Type: Repository Service
Service Status: Running

# 测试工作流执行
$ ./pmcmd startworkflow -sv IntegrationService -d DOMAIN1 -u Administrator -p Admin123 -f “ETL_Folder” -w
“wf_extract_customer_data”

Workflow wf_extract_customer_data started with run id [12345].

# 监控工作流执行状态
$ ./pmcmd getworkflowdetails -sv IntegrationService -d DOMAIN1 -u Administrator -p Admin123 -f “ETL_Folder”
-w “wf_extract_customer_data” -r 12345

Workflow run status: SUCCEEDED
Start time: 2026-04-03 11:00:00
End time: 2026-04-03 11:05:30
Total run time: 5 minutes 30 seconds
Number of sources: 2
Number of targets: 3
Number of transformations: 5
Number of rows processed: 100000

风哥风哥提示:测试时应选择具有代表性的工作流进行测试,确保覆盖不同类型的ETL操作,验证升级后系统的稳定性和性能。

8. 回滚计划

回滚计划是升级过程中的重要保障,当升级出现问题时,能够快速恢复到升级前的状态。

# 停止Informatica服务
$ cd /opt/informatica/10.2.0/server/tomcat/bin
$ ./shutdown.sh

# 恢复备份的配置
$ tar -xzf /backup/informatica_config_20260403.tar.gz -C /opt/informatica/9.6.1/

# 启动旧版本服务
$ cd /opt/informatica/9.6.1/server/tomcat/bin
$ ./startup.sh

# 恢复存储库
$ cd /opt/informatica/9.6.1/server/bin
$ ./pmrep connect -r REP1 -d DOMAIN1 -n Administrator -X Admin123
$ ./pmrep restore -f /backup/informatica_rep1_backup_20260403.xml

Restore completed successfully.

# 验证服务状态
$ ./infacmd.sh isp ListServices -dn DOMAIN1 -un Administrator -pd Admin123

Service Name: IntegrationService
Service Type: Integration Service
Service Status: Running

Service Name: RepositoryService
Service Type: Repository Service
Service Status: Running

9. 最佳实践

ETL升级与迁移的最佳实践包括规划、测试、监控等多个方面,以下是一些关键建议。author:www.itpux.com

生产环境风哥建议:

  • 在测试环境中完成所有升级和迁移测试,确保过程顺利
  • 选择业务低峰期进行升级,减少对业务的影响
  • 制定详细的升级计划和回滚计划
  • 升级后进行全面的性能测试,确保系统性能不劣化
  • 建立升级后的监控机制,及时发现和解决问题
  • 对相关人员进行培训,确保他们熟悉新版本的特性和操作
# 性能测试示例
$ ./pmcmd startworkflow -sv IntegrationService -d DOMAIN1 -u Administrator -p Admin123 -f “ETL_Folder” -w
“wf_performance_test”

Workflow wf_performance_test started with run id [12346].

# 监控性能指标
$ ./pmcmd getworkflowdetails -sv IntegrationService -d DOMAIN1 -u Administrator -p Admin123 -f “ETL_Folder”
-w “wf_performance_test” -r 12346

Workflow run status: SUCCEEDED
Start time: 2026-04-03 12:00:00
End time: 2026-04-03 12:03:45
Total run time: 3 minutes 45 seconds
Number of sources: 3
Number of targets: 2
Number of transformations: 8
Number of rows processed: 500000

# 与升级前性能对比
# 升级前:5 minutes 30 seconds
# 升级后:3 minutes 45 seconds
# 性能提升:约33%

通过以上步骤,我们成功完成了ETL系统的升级与迁移,确保了系统的稳定性和性能。在实际操作中,应根据具体的ETL工具和环境进行调整,确保升级过程的顺利进行。

本文由风哥教程整理发布,仅用于学习测试使用,转载注明出处:http://www.fgedu.net.cn/10327.html

联系我们

在线咨询:点击这里给我发消息

微信号:itpux-com

工作日:9:30-18:30,节假日休息