日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

DataStage8.7连接远程Oracle数据库

發布時間:2025/3/20 数据库 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 DataStage8.7连接远程Oracle数据库 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?參考資料:
http://www-01.ibm.com/support/docview.wss?uid=swg21441132

http://space.itpub.net/6126/viewspace-722164
http://www-01.ibm.com/support/docview.wss?uid=swg21398527

注明:此文檔由dl_lang的文章“Datastage8.5連接Oracle數據庫”整理而來

1.軟件環境
? 1).DataStage 8.7
 2).RHEL6.2
? 3).Oracle Client11g(R1)
? 說明:DataStage要連接oracle數據庫,通常情況下,有兩種方式,一種是ODBC的方式,這種方式不需要安裝Oracle Client,但是需要配置ODBC源;第二種方式就是通過Oracle Client,通過在Oracle Client里面配置TNS以訪問遠程數據庫。當然安裝Oracle Server也是可以的。

2.問題描述
?
DataStage client通過連接器Oracle Connector連接Oracle數據庫是出現如下的問題:
?????? DataStage無法與此連接器連接
?????? Error loading connector library libccora11g.so.libclntsh.so.11.1:cannot open shared object file:No such file or directory
???

3.原因分析
??
沒有將Oracle的環境變量寫入到DataStage的dsenv文件

4.解決方法

?? 1)?、確保Oracle Client能成功連接Oracle Server(oracle用戶登錄)
???? a)
檢查TNS配置
  ?? 以oracle用戶登錄(我安裝oracle client的時候,是創建了oracle用戶的。),然后在$ORACLE_HOME/network/admin文件夾配置tnsnames.ora,我的配置如下:
  ?? [oracle@is-server admin]$ cat tnsnames.ora
  ?? # tnsnames.ora Network Configuration File:/home/oracle/product/11.1.0/cleint_1/network/admin/tnsnames.ora
  ?? # Generated by Oracle configuration tools.
  ?? ORCL_242 =
   (DESCRIPTION =
    (ADDRESS_LIST =
    ? (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLESERVER)(PORT = 1521))
    )
    (CONNECT_DATA =
    ? (SERVICE_NAME = orcl)
    )
    )
???? 當然你也可以啟動netca配置TNS

?? b) 確認oracle用戶的配置文件.bash_profile已經成功配置了ORACLE_HOME

[oracle@is-server ~]$ cat .bash_profile
# User specific environment and startup programs
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/cleint_1
export ORACLE_SID=orcl
export PATH=H$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:usr/lib

????c) 測試Oracle client能連接Oracle Server

????? [oracle@is-server ~]$ sqlplus scott/tiger@orcl_242

? 2)、DataStage Server端配置(可以以安裝DataStage Server的用戶登錄,也可以是root用戶)

  a) 在dsenv文件里面配置相應的參數(其中dsenv文件在$DSHOME)

[root@is-server DSEngine]# echo $DSHOME
/opt/IBM/InformationServer/Server/DSEngine
[root@is-server DSEngine]# cat dsenv
# add by snowmice in 2012-08-30
Export DSHOME=/opt/IBM/InformationServer/Server/DSEngine
export ORACLE_HOME=/home/oracle/product/11.1.0/cleint_1
export TNS_ADMIN=/home/oracle/product/11.1.0/cleint_1/network/admin
export LD_LIBRARY_PATH=$APT_ORCHHOME/bin:$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib
export PATH=$PATH:$ORACLE_HOME/bin:$APT_ORCHHOME/bin
export ORACLE_BASE=/home/oracle
export LIBPATH=$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$LIBPATH

?? b) 查找缺失的libccora11g.so的具體位置

[root@is-server DSEngine]# find /opt -name libccora*
/opt/IBM/InformationServer/Server/DSComponents/bin/libccora10g.so
/opt/IBM/InformationServer/Server/DSComponents/bin/libccora11g.so
/opt/IBM/InformationServer/Server/StagingArea/Installed/OracleConnector/Server/linux/libccora10g.so
/opt/IBM/InformationServer/Server/StagingArea/Installed/OracleConnector/Server/linux/libccora11g.so
我們缺少的是libccora11g.so

?? c) 在lib文件里面建立連接文件

[root@is-server DSEngine]# cd $ORACLE_HOME/lib
[root@is-server lib]# ln -s /opt/IBM/InformationServer/Server/StagingArea/Installed/OracleConnector/Server/linux/libccora11g.so licccora11g.so
[root@is-server lib]# ln –s /opt/IBM/InformationServer/Server/StagingArea/Installed/OracleConnector/Server/linux/libccora10g.so licccora10g.so

?? d) 然后執行install.liborchoracle

找到install.liborchoracle
[root@is-server DSEngine]# find /opt -name install.liborchoracle
/opt/IBM/InformationServer/Server/DSComponents/install/install.liborchoracle
/opt/IBM/InformationServer/Server/StagingArea/Installed/PxOracle/install/install.liborchoracle

設置需要的環境變量
[root@is-server lib]# export DSHOME=/opt/IBM/InformationServer/Server/DSEngine
[root@is-server lib]# export APT_ORCHHOME=/opt/IBM/InformationServer/Server/PXEngine

更改對應的設置

[root@is-server DSEngine]$ cd /opt/IBM/InformationServer/Server/StagingArea/Installed/PxOracle/install/
[root@is-server install]$ vi install.liborchoracle
?找到
?install_driver() {

? case $version in
  9 ) VER='9i';;
  10 ) VER='10g';;
  0 ) return;;
?esac
?改成
?install_driver() {
?? case $version in
  9 ) VER='9i';;
  10|11 ) VER='10g';;
  0 ) return;;
?esac
然后執行install.liborchoracl
[root@is-server install]#/opt/IBM/InformationServer/Server/StagingArea/Installed/PxOracle/install/install.liborchoracle
Installing? Oracle driver.
Please choose the Oracle Driver version you want to install
from the following menu:
9 -> support for Oracel 9i
10 -> supprt for Oracle 10g
0 -> exit.
Enter version: [0]: > 10???? --選擇10進行安裝?????
{10}
Installing? driver for Oracle Version 10g
Oracle driver installation is completed.

? e) 測試下動態鏈接庫

[root@is-server install]# cd $ORACLE_HOME/lib
[root@is-server lib]# ls -al libcc*
lrwxrwxrwx 1 root root 99 Aug 30 19:44 libccora11g.so -> /opt/IBM/InformationServer/Server/StagingArea/Installed/OracleConnector/Server/linux/libccora11g.so
打印可執行檔依賴的共享庫文件
[root@is-server lib]# ldd libccora11g.so
linux-vdso.so.1 => (0x00007fffe5ffd000)
/opt/IBM/InformationServer/Server/DSComponents/lib/libicui18n.so (0x00002b838afc7000)
libicuio.so.32 => /opt/IBM/InformationServer/Server/PXEngine/lib/libicuio.so.32 (0x00002b838b1e5000)
libicuuc.so.32 => /opt/IBM/InformationServer/Server/PXEngine/lib/libicuuc.so.32 (0x00002b838b2f1000)
libfcl.so => /opt/IBM/InformationServer/Server/PXEngine/lib/libfcl.so (0x00002b838b4df000)
libclntsh.so.11.1 => /home/oracle/app/oracle/product/11.2.0/client_1/lib/libclntsh.so.11.1 (0x00002b838b7e3000)
……

? f) 這個時候我們可以在DataStage client打開“DS Administrator Client”查看環境變量

?3)、重新啟動DataStage servr服務和IS agent(請注意順序)

[1]?? stop DS engine
[root@datastage DSEngine]# cd /opt/IBM/InformationServer/Server/DSEngine/bin
[root@datastage DSEngine]#./uv –admin –stop

[2]? stop IS agent
[root@datastage DSEngine]# cd /opt/IBM/InformationServer/ASBNode/bin
[root@datastage DSEngine]#./NodeAgents.sh stop

[3]? start IS agent
[root@datastage DSEngine]# cd /opt/IBM/InformationServer/ASBNode/bin
[root@datastage DSEngine]#./NodeAgents.sh start

[4]? start DS engine
[root@datastage DSEngine]# cd /opt/IBM/InformationServer/Server/DSEngine/bin
[root@datastage DSEngine]#./uv –admin –start?

?4)、這個時候,我們就可以在DataStage的Designer client里面連接Oracle數據庫了

/**********************************★如果有任何疑問和錯誤,歡迎大家賜教!★**********************************/

轉載于:https://www.cnblogs.com/mice/archive/2012/08/30/mice.html

總結

以上是生活随笔為你收集整理的DataStage8.7连接远程Oracle数据库的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。