使用Oracle作為Cognos 連線類型-Install Oracle Client and Configuration

使用Oracle作為Cognos 連線類型-Install Oracle Client and Configuration

1.於Cognos BI Server安裝Oracle Database Client,選擇32位元,不使用instant client (64位元不支援詳見註1)

download-Oracle Database Client (12.1.0.2.0) for Microsoft Windows (32-bit) 

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-win64-download-2297732.html

安裝步驟

1.1選擇一般執行程式版本

1.2使用Windows內建帳戶

2.於Oracle sqldeveloper的lib路徑下,複製ojdbc6.jar 至Cognos c10 的web-inf\lib下。(依安裝的Oracle 版本不同,檔名不同)

Name            JRE version    Easy location to obtain from                                   Alternative source location
ojdbc14.jar    1.4                   Legacy (historic) - not supported by Oracle           n/a
ojdbc5.jar        5                    Oracle 11G rel2 client                                             Download from oracle.com
ojdbc6.jar        6                    Oracle 11G rel2 or 12C client                                 Download from oracle.com
ojdbc7.jar        7                    Oracle 12C client                                                    Download from oracle.com

To configure the Java Database Components (JDBC) in the Cognos 10 environment:

Navigate to the following Oracle installation path:

Oracle_Installation_Path\product\Oracle_Version\client_1\sqldeveloper\jdbc\lib

Copy the ojdbc6.jar file to the following location on the Cognos 10 environment:

Cognos_Installation_Path\c10\webapps\p2pd\web-inf\lib

3.(若使用動態查詢模式)將..\ c10\v5dataserver \databaseDriverLocations.properties.sample去掉.sample重新命名

Depending on the operating system, the PATH, LIBPATH and LD_LIBRARY_PATH will need to be configured to the location of the ociJDBCXX (where the XX represents the Oracle version) library. The Dynamic Query Mode also requires that the ..\ c10\v5dataserver \databaseDriverLocations.properties.sample file is renamed to databaseDriverLocations.properties and the databaseJNIPath is set to the same location as the above mentioned environment variable.

4.設定tnsnames.Ora檔案

複製該路徑下的tnsnames.Ora檔

C:\OracleClient\product\12.1.0\client_1\network\admin\sample

複製到上一層的admin資料夾下

C:\OracleClient\product\12.1.0\client_1\network\admin

5.編輯tnsnames.Ora

6.使用已安裝的SQL Developer測試連線至遠端的Oracle DB

若跳出enter the full pathname for java.exe

請輸入Oracle_Installation_Path\product\Oracle_Version\client_1\jdk\jre\bin\java.exe

以上確認server環境設定完成!

----------------------------------------------------------------------------------------------------------------------------------------------------------------

接著在Cognos 組態設定一組新的資料連線囉

1.不選JDBC連線(JDBC連線詳見註4)

2.設定SQL*Net 連線字串,並測試成功

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=192.168.38.200) (PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=pdborcl)))

參考資料

1.Installing 32-bit Oracle database client for IBM Connections (Cognos)

https://www.urspringer.de/2015/01/12/installing-32-bit-oracle-database-client-for-ibm-connections-cognos/

2.Oracle 11 client connection in C10 "Failed"

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014700234

3.Resolving Oracle connection errors from Cognos Business Intelligence

-Error UDA-SQL-0432 Unable to locate the gateway "cogudaor".

http://www-01.ibm.com/support/docview.wss?uid=swg21341734

4.使用JDBC連線

http://rollito.co/configure-oracle-12g-connection-in-cognos-10-2