使用 Visual Studio 和 Visual Studio Code 建置 .NET 應用程式

Oracle Autonomous AI Database on Dedicated Exadata Infrastructure 支援 Microsoft .NET Framework、.NET Core、Visual Studio 及 Visual Studio Code 的連線。

Oracle Data Provider for .NET (ODP.NET) 提供對自治式 AI 資料庫的程式實際執行 ADO.NET 資料存取。ODP.NET 具有下列驅動程式類型:

Oracle Developer Tools for Visual Studio 在 Visual Studio 中提供資料庫應用程式設計階段支援,包括用於管理 Oracle Cloud 中自治式 AI 資料庫的工具。

Oracle Developer Tools for VS Code 可在 Visual Studio Code 中提供資料庫應用程式設計階段支援。

這些軟體元件可在下列網站免費下載:

Oracle 建議將最新的提供者和工具版本與自治式 AI 資料庫搭配使用。

設定指示

請參閱開發 .NET Applications for Oracle Autonomous AI Database ,瞭解如何下載、安裝及設定這些元件,以與 Oracle Autonomous AI Database on Dedicated Exadata Infrastructure 搭配使用。

請注意,這些指示顯示如何將 TCPS (TCP 與 SSL) 連線至資料庫 (需要使用公事包)。對於專用基礎架構上的資料庫,您可以改為透過 TCP 連線資料庫,而不需要使用公事包。

若要深入瞭解如何在專用 Exadata 基礎架構和 .NET 上使用 Oracle Autonomous AI Database,請嘗試使用免費的 .NET Development with Oracle Autonomous AI Database Quick Start 。本實驗室會逐步介紹如何在 Oracle Cloud Infrastructure 上設定連線至自治式 AI 資料庫的 .NET Web 伺服器。接下來,實驗室會引導您開發和部署使用所有這些元件的簡單 ASP.NET Core Web 應用程式。最後,您將在網際網路上有一個即時、工作的網站。

設定高可用性與效能

在最新的 ODP.NET 版本中,快速連線容錯移轉 (FCF) 和連線程式實際執行負載平衡 (RLB) 會透過連線字串預設設定值自動啟用。FCF 需要連線字串設定、集區 (真) 和 HA 事件 (真)。RLB 需要設定「集區」(true) 和「負載平衡」(true)。

應用程式連續性目前僅適用於未受管理的 ODP.NET。預設會透過連線集區設定「應用程式連續性 (true)」啟用此功能。

針對 ONS 連線使用 TCP 時,不需要其他組態。

ONS TCPS 需要一些組態和程式碼變更,取決於使用的提供者:

OracleConfiguration.OnsWalletLocation = @"<wallet-directory>";
<oracle.manageddataaccess.client>
  <version number="*">
    <onsConfig mode="remote">
      <settings>
        <setting name="Protocol" value="TCPS" />
        <setting name="WALLET_LOCATION" value="***<wallet-directory>***" />
      </settings>
      <ons database="***<database-name>***">
        <add name="nodeList" value="slcai611:6205,slcai610:6205,slcai612:6205" />
      </ons>
    </onsConfig>
    <settings>
      <setting name="WALLET_LOCATION" value="***<wallet-directory>***" />
    </settings>
  </version>
</oracle.manageddataaccess.client>
<oracle.unmanageddataaccess.client>
  <version number="*">
    <onsConfig mode="remote">
      <settings>
        <setting name="Protocol" value="TCPS" />
        <setting name="WALLET_LOCATION" value="***<wallet-directory>***" />
      </settings>
      <ons database="***<database-name>***">
        <add name="nodeList" value="slcai611:6205,slcai610:6205,slcai612:6205" />
      </ons>
    </onsConfig>
    <settings>
      <setting name="WALLET_LOCATION" value="***<wallet-directory>***" />
    </settings>
  </version>
</oracle.unmanageddataaccess.client>

相關內容