Configuration Management

1.1       Migration Procedures

这里的迁移是指从开发、测试到QA和生产(production)等阶段的迁移过程。

最佳迁移策略的决定因素:

  • 怎样设计PowerCenter repository 环境?是为每个阶段创建各自独立的repositories,还是为多个阶段共享一个或多个repositories。
  • 怎样定义文件夹架构?

1.1.1       Repository environments:

      Standalone Repository Environment

所有的工作都在单一的用来存储元数据的PowerCenter repository,分别为开发、QA、和产品创建工作区。这个构架确保了迁移的无缝联接。

Example1-典型的架构:

 

  • 为开发人员分别建立开发文件夹
  • 建一个单一的公共文件夹保存所有公共的东西
  • 创建两个测试文件夹,一个用来与个人开发文件夹所匹配的所有单元测试,另一个共享的文件夹用来包含所有的测试共享的东西
  • 创建两个生产(production)文件夹

迁移到测试:

  1. 在完成单元测试之后,首先从SHARED_DEV_MARKETING拷贝所有的共享的东西到SHARED_TEST_MARKETING。由一下两个方法:
  • 首先,也是最通用的,把SHARED_DEV_MARKETING拖到SHARED_TEST_MARKETING中适合的工作区(如:Source 分析器、数据仓库设计器等)
  • 另外一种方法,提取XML特征。从SHARED_DEV_MARKETING文件夹中导出每个对象的XML,在把这些XML导到SHARED_TEST_MARKETING
  1. 所有的共享的东西成功迁移后,在TEST_MARKETING 文件夹创建快捷方式——把SHARED_TEST_MARKETING文件夹的每个东西拖到TEST_MARKETING
  2. 在共享的东西迁移后,再从每个开发文件夹(不知道是从SHARED_TEST_MARKETING还是个人文开发件夹?)中拷贝个人映射(mapping)到TEST_MARKETING。你可以用上面提到的两个方法。如果是用拖的办法,那么会有一点不一样,它会生成指向SHARED_TEST_MARKETING的快捷方式(这个由Designer决定的)。
  3. 最后,拷贝指向这些映射的工作流。可以用工作流向导来完成拷贝。

迁移到生产(production):

  1. 打开PowerCenterRepository Manager,登陆到repository
  2. 选择SHARED_TEST_MARKETING文件夹,选择菜单的拷贝(Edit/Copy)和黏贴(Edit/Paste)。创建SHARED_PROD_MARKETING和PROD_MARKETING生产环境(production)文件夹

迁移结束后,为生产环境添加了两个文件夹SHARED_PROD_MARKETING和PROD_MARKETING。这些文件夹包含了迁移的初始东西,在生产文件夹(production folders)跑工作流前,需要把源和目标的链接会话改成生产环境的链接。

 

变更迁移:

  1. 登陆到PowerCenter Designer,打开目标文件夹,展开源文件夹(source folder),选择对象,拷贝或拖到适当的工作区窗口中
  2. 覆盖原有的东西
  3. 保存文件夹
  4. 新拷贝的映射(mapping)指到原有映射会话(应该是连接会话)
  5. 登陆Workflow Manager,更新会话或工作流

 

Example2

迁移到QA:

  1. 如果用快捷方式,转步骤b,否则转c
  2.  
  • 从SHARED_DEV_MARKETING拷贝测试对象到SHARED_TEST_MARKETING
  • 把所有的新拷贝的对象从SHARED_TEST_MARKETING拖到TEST_MARKETING
  1. 从开发环境拷贝映射(mapping)到测试环境
  2.  
  • 在PowerCenter Designer中,打开TEST_MARKETING,把开发文件夹中的映射拖到TEST_MARKETING中
  • Choose to reuse the object for all the mappings copied into the folder(应该是replace吧?)
  1. 如果重用会话任务,转f,否则转d
  2.  
  • 在PowerCenter Workflow Manager中,打开TEST_MARKETING,把可重用的会话(session)拖到TEST_MARKETING。可用Copy Session Wizard
  • Open each newly copied session and click on the Source tab. Change the source to point to the test source.
  • Click the Target tab. Change each connection to point to the test target area. Be sure to Double-check the workspace from within the Target tab to ensure that the load options are correct.
  1. While the TEST_MARKETING folder is still open, copy each workflow from Development to Test.
  2. Drag each workflow from the development folders into the TEST_MARKETING folder. The Copy Workflow Wizard will appear. Follow the same steps listed above to copy the workflow to the new folder.
  3. Implement the appropriate security
  4.  
  • In Development, the owner of the folders should be a user(s) in the development group.
  • In Quality Assurance, change the owner of the QA folder to a user(s) in the QA group.
  • In Production, change the owner of the folders to a user in the Production group.
  • Revoke all rights to Public other than Read for the Production folders.

A Single Repository Environment的缺点:

一个最大的缺点是性能问题,因为它们依赖于相同的数据库表空间,如果开发或测试与生产同时运行,那么生产的性能将受到影响。当然很多情况生产环境运行是在晚上,不会影响开发和测试,但是在测试的时候或使环境或连接产生异常,从而影响生产环境的运行。

      Distributed Repository Environment

Definition:

A distributed repository environment maintains separate, independent repositories,

hardware, and software for development, QA, and production environments.

Separating repository environments is preferable for handling development to

production migrations. Because the environments are segregated from one another,

work performed in development cannot impact QA or production.

 

There are three techniques for migrating from development to production:

  • Repository Copy

Advantage:

The main advantage of this approach is the ability to copy all objects (mappings, workflows, mapplets, reusable transformation, etc.) at once from one environment to another. Another advantage is the ability to automate this process using pmrep commands.

Disadvantage:

The first is that everything is moved at once (which is also an advantage). The problem with this is that everything is moved, ready or not. This leads to the second disadvantage, the maintenance required to remove any unwanted or excess objects. Another disadvantage is the need to adjust server variables, sequences, parameters/variables, database connections, etc. Everything must be set up correctly before the actual production runs can take place.

Three ways to accomplish the Repository Copy method:

  • Copying the Repository
  • Repository Backup and Restore
  • PMREP

Migration Cleanup:

  1. Disable workflows that are not ready for Production or simply delete the mappings, tasks, and workflows.
  2.  
  • Disable the workflows not being used in the Workflow Manager by opening the workflow properties, and then checking the Disabled checkbox under the General tab.
  • Delete the tasks not being used in the Workflow Manager and the mappings in the Designer.
  1. Modify the database connection strings to point to the production sources and targets.
  2.  
  • In the Workflow Manager, select Relational connections from the Connections menu.
  • Edit each relational connection by changing the connect string to point to the production sources and targets.
  • If using lookup transformations in the mappings and the connect string is anything other than $SOURCE or $TARGET, then the connect string will need to be modified appropriately.
  1. Modify the pre- and post-session commands and SQL as necessary.
  2. In the Workflow Manager, open the session task properties, and from the Components tab make the required changes to the pre- and post-session scripts.
  3. Implement appropriate security, such as:
  4.  
  • In development, ensure that the owner of the folders is a user in the development group.
  • In test, change the owner of the test folders to a user in the test group.
  • In production, change the owner of the folders to a user in the production group.
  • Revoke all rights to Public other than Read for the Production folders.
  • Folder Copy

Advantage and Disadvantage:

Copying an entire folder allows you to quickly promote all of the objects located within. All source and target objects, reusable transformations, mapplets, mappings, tasks, worklets and workflows are promoted at once. Because of this, however, everything in the folder must be ready to migrate forward. If some mappings or workflows are not valid, then developers (or the Repository Administrator) must manually delete these mappings or workflows from the new folder after the folder is copied.

Three advantages:

  • The Repository Managers Folder Copy Wizard makes it almost seamless to copy an entire folder and all the objects located within it.
  • If the project uses a common or shared folder and this folder is copied first, then all shortcut relationships are automatically converted to point to this newly copied common or shared folder.
  • All connections, sequences, mapping variables, and workflow variables are copied automatically.

The primary disadvantage of the folder copy method is that the repository is locked while the folder copy is being performed. Therefore, it is necessary to schedule this migration task during a time when development can be frozen.

  • Object Copy

One advantage of Object Copy in a distributed environment is that it provides more granular control over objects.

Two distinct disadvantages of Object Copy in a distributed environment are:

  • Much more work to deploy an entire group of objects
  • Shortcuts must exist prior to importing/copying mappings
  • Recommendations

Informatica recommends using the following process when running in a three-tiered environment with Development, Test/QA, and Production servers:

For migrating from development into test, Informatica recommends using the Object Copy method. This method gives you total granular control over the objects that are being moved. It also ensures that the latest development maps can be moved over manually as they are completed. For recommendations on performing this copy procedure correctly, see the steps listed in the Object Copy section.

When initially migrating from test to production, Informatica recommends using the Repository Copy method. Before performing this migration, be sure that all code in the test server is frozen and tested. After the test code is cleared for production, use one of the repository copy methods. (Refer to the steps listed in the Repository Copy section for recommendations to ensure that this process is successful.). If you use similar server and database naming conventions, few or no changes will be required to sessions that are created or copied to the production server.

1.1.2       XML OBJECT COPY PROCESS

This method is most useful in a distributed environment because objects can be backed up into an XML file and moved across the network.

The XML Object Copy Process allows you to copy sources, targets, reusable transformations, mappings, mapplets, workflows, worklets, and tasks. After the XML file has been created, it can be changed with a text editor to allow additional flexibility. For example, if you had to copy one session task many times, you could export that session to an XML file. Then, you could edit that file to find everything within the <Session> tag, copy that text, and paste that text into the XML file. You would then change the name of the session you just pasted to be unique. When you import that XML file back into your folder, two sessions will be created.

1.1.3       VERSIONING

With the Designer and Workflow Managers import/export functionality, you can catalog XML files for individual objects and the associated powrmart.dtd file inside these third-party tools and control the versions. Example: you can export the xml files, and add the files into VSS to control the versions, and you can export the xml files from the VSS.

转载于:https://www.cnblogs.com/aaron_chen/archive/2010/11/19/1882023.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值