讀者 UG 提了一個好問題

ASP.NET /bin 組件載入跟你想的不一樣文章曾提到「"安裝 Oracle Client 時會一併安裝 ODP.NET 到 GAC,故實務上 ASP.NET 會使用裝在 GAC 的組件,並不需要部署 /bin/Oracle.DataAccess.dll。"」
但前幾天 ODP.NET 元件註冊 SOP卻又說「由於 Oracle Client 安裝完並不會自動將 ODP.NET 註冊到 GAC,也不會註冊發行者原則,要借用這個方便機制得手工完成。」

兩個說法矛盾,到底哪個是對的?若不是讀者提醒,我都忘記以前的經驗是會自動註冊,但依經驗應是新版安裝程式行為改變,才會「昨是今非」,至於是哪個版本開始改的,就來當一下鍵盤柯南吧。


(註:順手試了Bing 剛升級的 DALL-E 3,比前一代進步蠻多的)

沒找到官方文件明確宣示此一改變,但由一些參考資料推敲,結論是 12.2 版起 ODAC 安裝程式不再提供自動註冊 GAC 選項,需使用 OraProvCfg.exe 自行註冊。

  1. ODAC 12.2c Release 1 Installation Instructions
    Machine-Wide Configuration
    ODAC offers the option to install in machine-wide or non-machine-wide configuration for managed and unmanaged ODP.NET. The machine-wide configuration includes placing the provider assembly into the GAC and updating the machine.config with configuration section handler and DbProviderFactory information. If non-machine-wide configuration is selected, none of these changes are made. By default, ODAC install uses non-machine-wide configuration for a new Oracle Home install and re-installs.
    ODAC 提供 Machine-Wide 及 Non-Machine-Wide 兩種設定,前者會將組件放入GAC 並更新 machine.config 修改 DbProviderFactory 等設定,後者則不會(註:如此同一台機器允許不同版本 ODP.NET 並存),ODAC 安裝程式採用後者。
  2. Oracle 連線類型 (SSRS 及 Power BI 報表伺服器)
    只有在使用 Oracle ODAC 驅動程式 12.2 和更新版本時,才需要執行下列步驟(指用 OraProvCfg 註冊 GAC)。
  3. 12.2 Installation Does Not Register Oracle Data Provider for .Net in the GAC (Doc ID 2272241.1)
    Oracle KB - 安裝 12.2 ODP.NET 時不會自動註冊 GAC
  4. Getting Power BI Desktop to work with Oracle ODAC AFTER version 12.2
    After ODAC 12.2, Oracle removed this option from the install, which means out of the box Oracle 18.x and 19.x ODAC installs are not seen by Power BI Desktop. (網友花了 24 小時安裝及解除安裝一堆不同版本後悟到的心得)

結案。

This article tries to find out when the ODAC setup removed the GAC registration step.


Comments

Be the first to post a comment

Post a comment