使用导出和导入功能迁移数据库

您可以将Jazz® Team Server和所有Engineering Lifecycle Management的数据库从一个供应商更换为另一个供应商。

开始之前

  • 必须在数据库服务器上具有管理特权。
  • 必须安装您要移至的数据库的受支持版本。 有关支持的数据库的完整列表,请参阅 IBM Engineering Lifecycle Management 的硬件和软件要求
  • 如果计划同时变更数据库和服务器版本,必须先将源数据库迁移至当前版本。 要执行此操作,请使用 repotools -addTables 命令。

关于本任务

重要: 只有在当前数据库是 Derby 的情况下,才能使用 repotools -export-import 命令更改数据库供应商;例如,将 Derby 更改为 Db2®.请勿使用这些命令备份数据库。

如果当前数据库不是 Derby,请使用 exportConcurrentimportConcurrent 命令迁移数据库。 请参阅使用 exportConcurrent 和 importConcurrent 命令迁移数据库

过程

  1. 停止正在运行的服务器,其中可能包括Jazz Team ServerEngineering Lifecycle Management服务器。
  2. 使用数据库命令来备份数据库。
    备份数据库是一种预防性措施,以防出现意外。 有关用于备份的指示信息,请参阅数据库文档。
  3. 重建所有安装的应用程序的索引文件并对其重建索引:
    对于 Jazz Team Server:
    1. 删除 JTS_install_dir/server/conf/jts/indices 目录。
    2. 打开命令窗口,运行以下命令以重建索引文件并对其重建索引:
      cd JTS_install_dir/server
      repotools-jts -rebuildIndices
      repotools-jts -reindex all
    用于Engineering Workflow Management
    1. 删除 CCM_install_dir/server/conf/ccm/indices 目录。
    2. 打开命令窗口,运行以下命令以重建索引文件并对其重建索引:
      cd CCM_install_dir/server
      repotools-ccm -rebuildIndices
      repotools-ccm -reindex all
    用于Engineering Test Management应用:
    1. 删除 QM_install_dir/server/conf/qm/indices 目录。
    2. 打开命令窗口,运行以下命令以重建索引文件并对其重建索引:
      cd QM_install_dir/server
      repotools-qm -rebuildIndices
      repotools-qm -reindex all
    对于“需求管理”应用程序:
    1. 删除 RM_install_dir/server/conf/rm/indices 目录。
    2. 打开命令窗口,运行以下命令以重建索引文件并对其重建索引:
      cd RM_install_dir/server
      repotools-rm -rebuildIndices
      repotools-rm -reindex all
    用于数据采集组件应用:
    1. 删除 DCC_install_dir/server/conf/dcc/indices 目录。
    2. 打开命令窗口,运行以下命令以重建索引文件并对其重建索引:
      cd DCC_install_dir/server
      repotools-dcc -rebuildIndices
      repotools-dcc -reindex all
    用于Global Configuration Management应用程序:
    1. 删除 GC_install_dir/server/conf/gc/indices 目录。
    2. 打开命令窗口,运行以下命令以重建索引文件并对其重建索引:
      cd GC_install_dir/server
      repotools-gc -rebuildIndices
      repotools-gc -reindex all
    用于IBM® Engineering Lifecycle Optimization Engineering Insights应用程序:
    1. 删除 ENI_install_dir/server/conf/relm/indices 目录。
    2. 打开命令窗口,运行以下命令以重建索引文件并对其重建索引:
      cd ENI_install_dir/server
      repotools-relm -rebuildIndices
      repotools-relm -reindex all
  4. 将每个应用程序的数据导出到 .tar 文件:
    JTS_install_dir/server repotools-jts -export toFile=JTSData.tar
    CCM_install_dir/server repotools-ccm -export toFile=CCMData.tar
    QM_install_dir/server repotools-qm -export toFile=QMData.tar
    RM_install_dir/server repotools-rm -export toFile=RMData.tar
    DCC_install_dir/server repotools-dcc -export toFile=DCCData.tar
    GC_install_dir/server repotools-gc -export toFile=GCData.tar
    ENI_install_dir/server repotools-relm -export toFile=ENIData.tar
    
  5. Jazz Team ServerEngineering Lifecycle Management创建单独的数据库。
    有关创建数据库的信息,请参阅以下资源:
  6. 在每个 teamserver.properties 文件中,查找下表中的部分。 通过注释掉现有数据库并移除注释 (#) 来引用新数据库。
    注: 如果已设置服务器,那么 teamserver.properties 文件的原始内容将保存在新文件中; 例如, teamserver-1340753205409backup.properties
    表 1. 数据库配置属性
    数据库 要从中移除注释的部分 更多信息
    Db2 Db2配置 手动配置 Db2 数据库
    Oracle Oracle 配置 手动配置 Oracle 数据库
  7. 通过输入 repotools 命令从 .tar 文件导入数据。
    JTS_install_dir/server repotools-jts -import fromFile=JTSData.tar
    CCM_install_dir/server repotools-ccm -import fromFile=CCMData.tar
    QM_install_dir/server repotools-qm -import fromFile=QMData.tar
    RM_install_dir/server repotools-rm -import fromFile=RMData.tar
    DCC_install_dir/server repotools-dcc -import fromFile=DCCData.tar
    GC_install_dir/server repotools-gc -import fromFile=GCData.tar
    ENI_install_dir/server repotools-relm -import fromFile=ENIData.tar
  8. 启动服务器。