Informatica&DAC

来源:互联网 发布:利用淘宝双十一赚钱 编辑:程序博客网 时间:2024/05/06 07:22

InformaticaheDAC简介和常见问题解决

Informatica

安装Informatica之前需要新建用户,详见下面
 INFORMATICA四个表空间:
    1.INFORMATICA:主要用来存储informatica的源表目标表和映射以及mapplet 
    2.DAC:主要存放DAC的配置信息以及tasks,subject aear等 
    3.bidwd:这个就是我们自己用的目标存储库 
    4.BIDWD_IND:索引表空间

--创建三个表空间,分别用于存储InformaticaDACDW

create tablespace INFORMATICA datafile 'E:\app\Administrator\oradata\orcl\informatica01.dbf' size 2000M autoextend on MAXSIZE 4000M;

create tablespace DAC datafile 'E:\app\Administrator\oradata\orcl\dacd01.dbf' size 400M autoextend on;

create tablespace BIDWD datafile 'E:\app\Administrator\oradata\orcl\bidwd01.dbf' size 4000M autoextend on MAXSIZE 8000M;

create tablespace BIDW_INDEXD datafile 'E:\app\Administrator\oradata\orcl\bidw_indexd01.dbf' size 2000M autoextend on MAXSIZE 4000M;

--创建Role,并分配权限

create role SSE_ROLE;

grant connect,resource to SSE_ROLE;

--创建数据库用户

CREATE USER infodomain IDENTIFIED BY infodomain DEFAULT TABLESPACE INFORMATICA TEMPORARY TABLESPACE TEMP;

CREATE USER inforeps IDENTIFIED BY inforeps DEFAULT TABLESPACE INFORMATICA TEMPORARY TABLESPACE TEMP;

CREATE USER dacreps IDENTIFIED BY dacreps DEFAULT TABLESPACE DAC TEMPORARY TABLESPACE TEMP;

CREATE USER bidw IDENTIFIED BY bidw DEFAULT TABLESPACE BIDWD TEMPORARY TABLESPACE TEMP;

GRANT SSE_ROLE,

CREATE ANY TABLE,

DROP ANY TABLE,

CREATE ANY INDEX,

DROP ANY INDEX,

CREATE ANY VIEW,

DROP ANY VIEW,

UNLIMITED TABLESPACE

TO infodomain,inforeps,dacreps,bidw;

--删除空的表空间,但是不包含物理文件
drop tablespace tablespace_name;
--删除非空表空间,但是不包含物理文件
drop tablespace tablespace_name including contents;
--删除空表空间,包含物理文件
drop tablespace tablespace_name including datafiles; 
--删除非空表空间,包含物理文件
drop tablespace tablespace_name including contents and datafiles;
--如果其他表空间中的表有外键等约束关联到了本表空间中的表的字段,就要加上CASCADE CONSTRAINTS
drop tablespace tablespace_name including contents and datafiles CASCADE CONSTRAINTS;


DAC

什么是DAC



部署到DAC
一个调度对应一个执行计划,一个执行计划对应一个或多个主题,一个主题对应一个或多个表
(一个主题对应一个或多个任务(任务也可以放在任务组里面)),一个表对应一个或多个任务,
一个任务对应多个源表和目标表

Informatica和DAC常见错误记录

Informatica常见错误记录

1、查看会话看不到的错误,报执行意外终止
会话没有执行完,原因是mapping中有问题,排错是从workflow中重新建一个看是否报错
最终原因是下面这个字段引起的
这个字段的数据为TIMESTAMP(6) WITH LOCAL TIME ZONE类型(eg:22-JUN-10 10.22.05.000000 AM)
而Informatica中的源没有timestamp类型只有date/time类型,将源进行date/time转换,后面的该字段类型都
选择date类型,发现还是报错(即去掉exp组件直接字段相连)。
解决方法是在exp组件处对该字段进行to_char转换,最后使用字符串解决。

2、警告:Update strategy transformation exists in the mapping but the source has not been flagged for data driven option.
选择data_driven即可,data_driven是什么意思呢?

Treat source rows as – 对目标表来说,如何处理抽取的数据,一般情况下选择‘Insert’,如果Mapping中有用到UPD控件时,选择‘Data Driven

3、某些字段没有数据

造成原因可能是,这些字段的类型发生了细微的变化,可能是在目标表和源表也可能是在exp组件转换的时候字段类型发生变化

4、没有指定键错误

在Informatica中给目标表设定一个主键即更新主键

5、Database driver error... 

CMN_1022 [The server does not support the database type specified on this OS platform.]

workflow连接Sqlserver遇到问题

详见http://datawarehouse.ittoolbox.com/groups/technical-functional/informatica-l/cmn_1022-the-server-does-not-support-the-database-type-specified-on-this-os-platform-3925413

http://wenku.baidu.com/link?url=qiSjn6UCFbnYK0ousrkN6T8U2jnwOCwUVTd1uLiUmqhizlDP1lnIsVj6u9Ic8s07K9JIQvUYKVMyKEFZvPlTjPGDSM7WVNszbjVYjL6q6VC

根据上面的链接做下面操作

在Linux服务器上的配置和修改(root用户)

export ODBCHOME=/biapptest/etl/Informatica/9.5.1/ODBC7.0 
export PATH=$ODBCHOME/bin:$PATH 
export LD_LIBRARY_PATH=$ODBCHOME/lib 
cp $ODBCHOME/odbc.ini $HOME/.odbc.ini 

vi $HOME/.odbc.ini 添加下面内容
[ODBC Data Sources] 
SQLServerODBC=DataDirect 7.0 SQL Server Legacy Wire Protocol 

[SQLServerODBC] 
Driver=/biapptest/etl/Informatica/9.5.1/ODBC7.0/lib/DWmsss26.so 
Description=DataDirect 7.0 SQL Server Legacy Wire Protocol 
Database=kingageYPH 
LogonID=sa 
Password=1q2w!Q@W 
Address=10.2.1.12,1433
QuoteId=No 
AnsiNPW=No

按照操作修改成ODBC连接之后存在的问题
Error connecting to database [
[unixODBC][Driver Manager]Can't open lib '/biapptest/etl/Informatica/9.5.1/ODBC7.0/lib/DWmsss26.so' : file not found

又在网上搜到这个链接https://community.oracle.com/thread/2594875

查看错误

isql -v SQLServerODBC


说是LD_LIBRARY_PATH没弄好,但是LD_LIBRARY_PATH有效是依然报这个错误

Everything in the strace file looks like a wrong LD_LIBRARY_PATH setting where the location of the Oracle client lib (for example libclntsh.so.12.1) is missing.

You mentioned above that you have set it, but got the same error.

1. Where is your libclntsh.so.12.1 library located?

2. Can you please again make sure the correct LD_LIBRARY_PATH is set and post the env setting as well as the isql output and a link to another, new isql.log file?

跟踪到的原因是 LD_LIBRARY_PATH没设置正确

env查看环境信息

LD_LIBRARY_PATH并没有设置为Informatica的路径

vi /home/bietltest/.bash_profile

新加红色框中的路径


然后切换用户使其生效

su - bietltest

用env命令查看环境设置是否生效

再重启Informatica服务

先重启tomcat服务

cd /biapptest/etl/Informatica/9.5.1/tomcat/bin

然后进入

cd /biapptest/etl/Informatica/9.5.1/server/tomcat/bin

重启Informatica的服务

最后使用odbc测试看能否跑通

6、SQLServer ETL Oracle汉字出现乱码
Informatica Code Page字符集设置总结
下面是配置列表:
1)Informatica Repository Server Codepage: MS Windows Latin 1 (ANSI), superset of Latin1--在我的机器上只能设置成两个code page,一个如上,另外一个是西欧字符WEISO8859-1之类的,不知道为什么?不过好像没有什么影响,根据我的猜测,可能是因为一个存储在Repository Server的配置信息比如server_name等等只要不是中文,全是英文的,就没有必要别的了,ANSI就足够了。
2)Informatica Server: Movement Mode 必须设置成 Unicode Mode 否则将会报错,诸如“Downcast error translating unicode character to ASCII”, 另外应该注意将Validate Data Codepage这项去掉(不选此项)。相应的配置界面在此不在赘述。
3)Database Connection definition 需要在Workflow Manager中配置,code page 应该和实际的target数据库一致。因此应该设成“MS Windows Simplified Chinese”,这点也很关键。
4)Server Definition in Workflow Manager: 应该和Repository Server 的codepage 一致,因为Informatica Server进程会连接Repository读取一些Server的基本信息,然后进程会打开一个端口来监听来势客户端的会话( it will open a Server Port [i.e.4001] to listen for client connections),因此code page 应该设置成 "MS Windows Latin 1 (ANSI), superset of Latin1". 否则Server在控制面板中会起不来。
配置基本完成,然后就是开发mapping, session和workflow, 并且运行,在此不再赘述。

http://www.cnblogs.com/wangyicarter/archive/2012/02/03/2337329.html
使用informatica将sqlserver2000抽取到mysql中文乱码问题??
http://www.itpub.net/thread-680571-1-1.html

最后解决乱码问题

主要是在系统配置ODBC的时候加一个编码。

Driver=/biapptest/etl/Informatica/9.5.1/ODBC7.0/lib/DWmsss26.so

Description=DataDirect 7.0 SQL Server Legacy Wire Protocol

Database=king

LogonID=sa

Password=123

Address=10.2.1.12,1433

QuoteId=No

AnsiNPW=No

IANAAppCodePage=113        --113代表GBK

7、Informatica导入表出现很多相同的列

原因是oracle协议不一致导致

需要安装oracle客户端选择Oracle in OraClient11g_home1协议

8、SQ无法生成SQL

原因是需要把目标和源连接起来才能生成SQL

9.Database errors occurred:
ORA-26002: Table DWH.W_XACT_TYPE_D has index defined upon it.
Database driver error...
Function Name : Prepare DPL
SQL Stmt : INSERT INTO W_XACT_TYPE_D

错误信息:ORA-26002

解决方法:

1.drop index

2.disable parallel loading

3.skip INDEX_MAINTAIN(不理解,没遇到过,还是疑问)

对于2解释如下:

 因为Bulk方式只能用来做Insert操作。而大家知道我们如果需要Update操作,在Session的Treat source rows as的设置上需要设置成Data Driven,当我们同时选择了两种设置,会有什么结果呢。如果你同时设置了Data Driven和Bulk模式 PowerCenter Sever将自动切换采用Normal 方式进行Load,所以将bulk模式改为normal 便可以解决问题。
增量:Data Driven ;Bulk/Normal
全量:Data Driven ;Normal

10.ORA-01007: variable not in select list
原因是Source Qualifier里面的sql字段顺序和端口的字段顺序不对应导致

DAC常见错误记录

1.Database errors occurred:
ORA-00001: unique constraint (DWH.W_SLS_ORD_LN_F_P1) violated

row_wid唯一性约束导致这条数据插入不进去,在信息中可以看到没有插入的记录


2.Overflow error. The Sequence Generator transformation has reached the end of the configured end value.
Sequence Generator组件错误

3.Create Index 失败
因为找不到其他关于错误的信息所以在下面导出log文件

在log文件中找到下面错误信息

解决办法:
这种错误的处理其实可以考虑几种方法:数据表里要建的这几列有重复的值,要么1、删除重复值,然后再建唯一索引2、就不建唯一索引3、或指定deferrable novalidate不校验表里已存在数据,只对以后的数据有影响。
4.ORA-00904: "ODUE_8_LOC_AMT": invalid identifier
数据库缺少这个字段

5.消息代码: DBG_21449
消息: [UPD_IA_AR_AGING_AGG_DEL]: REJECT: Discarding output row for transformation [W_AR_AGING_CUSTOMER_A2]
丢失输出,相当于拒绝了这条更新虽然报错了

6.::: CAUSE ::: MESSAGE:::Error while persisting dependency.
MESSAGE :::ORA-00001: 违反唯一约束条件 (DACREP.W_ETL_DEFN_STEP_P1)
EXCEPTION CLASS::: java.sql.BatchUpdateException
解决办法:全部重新做,相应的主题区域和执行计划重新创建最好名字也重命名,因为发现有些任务的名字和主题区域的名字一样可能违反唯一性约束

7.VAR_27026 Error: Missing initial value for session parameter:[$DBConnection_OLAP]
https://community.oracle.com/thread/1957222?tstart=0
1. Which Version of BI Apps are you using 7.9.5 or 7.9.6 (as you mentioned before in your first post).?
2. Make sure DAC version, Informatica Version you are using supports your current BI Apps Version and follow the configuration steps accordingly.
3.Yes, Previously till BIApps 7.9.5, DAC automatically gets installed at :/OracleBI/ location, but from BI Apps V 7.9.6 you need to install DAC V 10.1.3.4... separately
4. Make sure your use same Connection Names used in DAC-->Physical Data Sources and in Informatica-->Workflow Manager-->Relational Connections.
5. Yes Informatica looks in to C:\Informatica1\PowerCenter8.6.0\server\infa_shared\SrcFiles for SrcFiles(.csv) and Creates Parameter files in that location separately for each workflow if you have set the value InformaticaParameterFileLocation to value of the $PMSourceFileDir
6.$PMSEssionLogFile is a built-in and is user defined Session parameter. You find this in any generated parameter file.
eg: $PMSessionLogFile=ORA_11_5_10_FLATFILE.DATAWAREHOUSE.SILOS.SIL_TimeOfDayDimension.log
7. In DAC did u Generate Parameters before starting the Execution Plan?
I assume that your parameter files are not generated correctly. Verify any of your parameter file generated so far to see if the values are correctly populated
My suggestion is please recheck all the configuration steps in the documentation according to your BI Apps Version before running your load.
错误原因是session的名字和workflow中的session的名字不一致导致
这类问题一般出在workflow
遇到这类问题最好全部检查一遍从Informatica到DAC
特别注意这个地方

8.源表字段为number类型到目标表为varchar2类型是出现.0000000后缀的问题
将字段类型更改为integer。

1 0
原创粉丝点击