问题描述
InformaticaPower Center产品安装部署在Linux/UNIX主机上,由于Linux和UNIX系
统上没有MicrosoftSQL Server的Native Driver,建议使用InformaticaPowerCenterOEM
的DataDirect ODBC来访问Microsoft SQL Server
解决方案
此文档以Linux系统为例,系统用户为infa,Informatica PowerCenter的版本为9.5.0,MicrosoftSQLServer的版本为2008R2。
编辑Linux系统用户infa的环境变量“.bashrc“或” .bash_profile“(unix系统用户的环境变量文件为”.profile“)
#.bashrc
# Sourceglobal definitions
if [ -f/etc/bashrc ]; then
. /etc/bashrc
fi
# Userspecific aliases and functions
###########################ORACLE##########################
exportORACLE_BASE=/opt/oracle
exportORACLE_HOME=$ORACLE_BASE/product/OraHome
exportORACLE_SID=orcl
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib:/lib:/usr/lib
exportPATH=$PATH:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/lib/java/bin:/usr/local/bin/:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
exportTNS_ADMIN=$ORACLE_HOME/network/admin
exportORA_CRS_HOME=$ORACLE_HOME/crs
exportCLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
exportNLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
################INFA##################
LANG=C;export LANG
PM_CODEPAGENAME="MS936";exportPM_CODEPAGENAME
exportPGCLIENTENCODING=UTF8
exportNLS_LANG=AMERICAN_AMERICA.AL32UTF8
exportINFA_HOME=/opt/informatica/9.5.1
exportPATH=$PATH:$INFA_HOME/server/bin:$INFA_HOME/tomcat/bin
exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFA_HOME/server/bin
exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFA_HOME/java/bin:ORACLE_HOME/lib
#######################GPLoader################################
exportGPHOME_LOADERS=/opt/gploader
exportPATH=${GPHOME_LOADERS}/bin:${GPHOME_LOADERS}/ext/python/bin:$PATH
exportPYTHONPATH=${GPHOME_LOADERS}/bin/ext
exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/gploader/lib
###################ODBC#####################
exportODBCHOME=${INFA_HOME}/ODBC7.0
exportLD_LIBRARY_PATH=$ODBCHOME/lib:/usr/lib64:${INFA_HOME}/tools/pcutils/9.5.1:$LD_LIBRARY_PATH
exportODBCINI=$ODBCHOME/.odbc.ini
exportPATH=$ODBCHOME/bin:$ODBCHOME/lib:$PATH
###################Essbase###########################
exportPATH=$PATH:/opt/essbase/EPMSystem11R1/common/EssbaseRTC-64/11.1.2.0/bin:${INFA_HOME}/server/bin
exportESSBASEPATH=/opt/essbase/EPMSystem11R1/common/EssbaseRTC-64/11.1.2.0
exportLD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/essbase/EPMSystem11R1/common/EssbaseRTC-64/11.1.2.0/bin:${INFA_HOME}/server/bin
#####################SAPHANA Client########################
exportLD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/sap/hdbclient
注意:添加ODBCHOME和ODBCINI环境变量信息。并将$0DBCHOME/bin添加到PATH
环境变量,将$0DBCHOME/lib添加到LD_LIBRARYPATH环境变量。
2、编辑.odbc.ini文件,配置如下:
将$1NFA_HOME/ODBC6.I/odbc.ini文件拷贝一个副本.odbci.ni进行编辑,目的是保留
Odbc.ini文件中原始的ODBC样例。
[ODBC]
#IANAAppCodePage=4
IANAAppCodePage=113
InstallDir=/opt/informatica/9.5.1/ODBC7.0
Trace=0
TraceFile=odbctrace.out
TraceDll=/opt/informatica/9.5.1/ODBC7.0/lib/DWtrc26.so
[MSSQL_INFATEST]
Driver=/opt/informatica/9.5.1/ODBC7.0/lib/DWsqls26.so
Description=DataDirect7.0 SQL Server Wire Protocol
AlternateServers=
AlwaysReportTriggerResults=0
AnsiNPW=1
ApplicationName=
ApplicationUsingThreads=1
AuthenticationMethod=1
BulkBinaryThreshold=32
BulkCharacterThreshold=-1
BulkLoadBatchSize=1024
BulkLoadFieldDelimiter=
BulkLoadOptions=2
BulkLoadRecordDelimiter=
ConnectionReset=0
ConnectionRetryCount=0
ConnectionRetryDelay=3
Database=ddgd_erp25
EnableBulkLoad=0
EnableQuotedIdentifiers=0
EncryptionMethod=0
FailoverGranularity=0
FailoverMode=0
FailoverPreconnect=0
FetchTSWTZasTimestamp=0
FetchTWFSasTime=1
GSSClient=native
HostName=10.3.4.185
HostNameInCertificate=
InitializationString=
Language=
LoadBalanceTimeout=0
LoadBalancing=0
LoginTimeout=15
LogonID=
MaxPoolSize=100
MinPoolSize=0
PacketSize=-1
Password=
Pooling=0
PortNumber=1433
QueryTimeout=0
ReportCodePageConversionErrors=0
SnapshotSerializable=0
TrustStore=
TrustStorePassword=
ValidateServerCertificate=1
WorkStationID=
XMLDescribeType=-10
注意:
① MSSQL_INFATEST: 配置Relational connection时需要用到,注意connect string要与该名称一致。
②ANAAppCodePagez113:113对应的是GBK字符集,[MSSQL_INFATEST]添加此参数,表示此ODBC连接使用GBK字符集;106表示UTF-8字符集。
如果不添加此参数,则使用默认的"IANAAppCodePage=4”参数(ISO-8859-1字符集)。
3、编辑/etc/hosts文件
说明:Mss0L2008R2为MSSQ Lserver数据库所在主机名。
4、:Relational Connection配置
·
参 考 信 息
1、 IANAAppCodePage 字 符 集 参 照 :
http://www.iana.org/assignments/character-sets/character-sets.xhtml
2、Odbc.ini 文件配置参照$|NFAHOME/ODBC6.1目录下odbc.ini文件