Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

readme.txt 9.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. Oracle.ManagedDataAccess NuGet Package 21.9.0 README
  2. ====================================================
  3. Release Notes: Oracle Data Provider for .NET, Managed Driver
  4. January 2023
  5. This README supplements the main ODP.NET 21c documentation.
  6. https://docs.oracle.com/en/database/oracle/oracle-database/21/odpnt/
  7. TABLE OF CONTENTS
  8. *Bug Fixes
  9. *Installation and Configuration Steps
  10. *Installation Changes
  11. *Documentation Corrections and Additions
  12. *ODP.NET, Managed Driver Tips, Limitations, and Known Issues
  13. Bug Fixes since Oracle.ManagedDataAccess NuGet Package 21.8.0
  14. =============================================================
  15. Bug 31456063 ORA-03111 IS ENCOUNTERED WHILE CANCELLING THE CURRENT COMMAND EXECUTION
  16. Bug 31793997 INCORRECT UDTS ARE RETURNED BY DATAREADER AFTER A NULL UDT IS FETCHED
  17. Bug 34431232 CURRENT DATABASE EDITION NAME IS NOT RETURNED BY ORACLECONNECTION
  18. Bug 34617083 RESOLVE CVE-2023-21893
  19. Installation and Configuration Steps
  20. ====================================
  21. The downloads are NuGet packages that can be installed with the NuGet Package Manager. These instructions apply
  22. to install ODP.NET, Managed Driver.
  23. 1. Un-GAC and un-configure any existing assembly (i.e. Oracle.ManagedDataAccess.dll) and policy DLL
  24. (i.e. Policy.4.122.Oracle.ManagedDataAccess.dll) for the ODP.NET, Managed Driver, version 4.122.21.1
  25. that exist in the GAC. Remove all references of Oracle.ManagedDataAccess from machine.config file, if any exists.
  26. 2. In Visual Studio, open NuGet Package Manager from an existing Visual Studio project.
  27. 3. Install the NuGet package from NuGet Gallery (nuget.org).
  28. From Local Package Source
  29. -------------------------
  30. A. Click on the Settings button in the lower left of the dialog box.
  31. B. Click the "+" button to add a package source. In the Source field, enter in the directory location where the
  32. NuGet package(s) were downloaded to. Click the Update button, then the Ok button.
  33. C. On the left side, under the Online root node, select the package source you just created. The ODP.NET NuGet
  34. packages will appear.
  35. From Nuget.org
  36. --------------
  37. A. In the Search box in the upper right, search for the package with id, "Oracle.ManagedDataAccess". Verify
  38. that the package uses this unique ID to ensure it is the official Oracle Data Provider for .NET, Managed Driver
  39. download.
  40. B. Select the package you wish to install.
  41. 4. Click on the Install button to select the desired NuGet package(s) to include with the project. Accept the
  42. license agreement and Visual Studio will continue the setup.
  43. 5. Open the app/web.config file to configure the ODP.NET connection string and connect descriptors.
  44. Below is an example of configuring the net service aliases and connect descriptors parameters:
  45. <oracle.manageddataaccess.client>
  46. <version number="*">
  47. <dataSources>
  48. <!-- Customize these connection alias settings to connect to Oracle DB -->
  49. <dataSource alias="MyDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
  50. </dataSources>
  51. </version>
  52. </oracle.manageddataaccess.client>
  53. After following these instructions, ODP.NET is now configured and ready to use.
  54. IMPORTANT: Oracle recommends configuring net service aliases and connect descriptors in a .NET config file to
  55. have the application configuration be self-contained rather than using tnsnames.ora or TNS_ADMIN.
  56. NOTE: ODP.NET, Managed Driver comes with one set of platform specific assemblies for Kerberos support: Oracle.ManagedDataAccessIOP.dll.
  57. The Oracle.ManagedDataAccessIOP.dll assembly is ONLY needed if you are using Kerberos5 based external
  58. authentication. Kerberos5 users will need to download MIT Kerberos for Windows version 4.0.1 from
  59. https://web.mit.edu/kerberos/dist/
  60. to utilize ODP.NET, Managed Driver's support of Kerberos5.
  61. The asssemblies are located under
  62. packages\Oracle.ManagedDataAccess.<version>\bin\x64
  63. and
  64. packages\Oracle.ManagedDataAccess.<version>\bin\x86
  65. depending on the platform.
  66. If these assemblies are required by your application, your Visual Studio project requires additional changes.
  67. Use the following steps for your application to use the 64-bit version of Oracle.ManagedDataAccessIOP.dll:
  68. 1. Right click on the Visual Studio project.
  69. 2. Select Add -> New Folder.
  70. 3. Name the folder x64.
  71. 4. Right click on the newly created x64 folder.
  72. 5. Select Add -> Existing Item.
  73. 6. Browse to packages\Oracle.ManagedDataAccess.<version>\bin\x64 under your project solution directory.
  74. 7. Choose Oracle.ManagedDataAccessIOP.dll.
  75. 8. Click the 'Add' button.
  76. 9. Left click the newly added Oracle.ManagedDataAccessIOP.dll in the x64 folder.
  77. 10. In the properties window, set 'Copy To Output Directory' to 'Copy Always'.
  78. For x86 targeted applications, name the folder x86 and add assemblies from the
  79. packages\Oracle.ManagedDataAccess.<version>\bin\x86 folder.
  80. To make your application platform independent even if it depends on Oracle.ManagedDataAccessIOP.dll, create both x64 and x86 folders with the necessary assemblies added to them.
  81. Installation Changes
  82. ====================
  83. The following app/web.config entries are added by including the ODP.NET, Managed Driver NuGet package to your application:
  84. 1) Configuration Section Handler
  85. The following entry is added to the app/web.config to enable applications to add an <oracle.manageddataaccess.client>
  86. section for ODP.NET, Managed Driver-specific configuration:
  87. <configuration>
  88. <configSections>
  89. <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
  90. </configSections>
  91. </configuration>
  92. Note: If your application is a web application and the above entry was added to a web.config and the same config
  93. section handler for "oracle.manageddataaccess.client" also exists in machine.config but the "Version" attribute values
  94. are different, an error message of "There is a duplicate 'oracle.manageddataaccess.client' section defined." may be
  95. observed at runtime. If so, the config section handler entry in the machine.config for
  96. "oracle.manageddataaccess.client" has to be removed from the machine.config for the web application to not encounter
  97. this error. But given that there may be other applications on the machine that depended on this entry in the
  98. machine.config, this config section handler entry may need to be moved to all of the application's .NET config file on
  99. that machine that depend on it.
  100. 2) DbProviderFactories
  101. The following entry is added for applications that use DbProviderFactories and DbProviderFactory classes. Also, any
  102. DbProviderFactories entry for "Oracle.ManagedDataAccess.Client" in the machine.config will be ignored with the following
  103. entry:
  104. <configuration>
  105. <system.data>
  106. <DbProviderFactories>
  107. <remove invariant="Oracle.ManagedDataAccess.Client" />
  108. <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
  109. </DbProviderFactories>
  110. </system.data>
  111. </configuration>
  112. 3) Dependent Assembly
  113. The following entry is created to ignore policy DLLs for Oracle.ManagedDataAccess.dll and always use the
  114. Oracle.ManagedDataAccess.dll version that is specified by the newVersion attribute in the <bindingRedirect> element.
  115. The newVersion attribute corresponds to the Oracle.ManagedDataAccess.dll version which came with the NuGet package
  116. associated with the application.
  117. <configuration>
  118. <runtime>
  119. <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  120. <dependentAssembly>
  121. <publisherPolicy apply="no" />
  122. <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
  123. <bindingRedirect oldVersion="4.122.0.0 - 4.65535.65535.65535" newVersion="4.122.21.1" />
  124. </dependentAssembly>
  125. </assemblyBinding>
  126. </runtime>
  127. </configuration>
  128. 4) Data Sources
  129. The following entry is added to provide a template on how a data source can be configured in the app/web.config.
  130. Simply rename "MyDataSource" to an alias of your liking and modify the PROTOCOL, HOST, PORT, SERVICE_NAME as required
  131. and un-comment the <dataSource> element. Once that is done, the alias can be used as the "data source" attribute in
  132. your connection string when connecting to an Oracle Database through ODP.NET, Managed Driver.
  133. <configuration>
  134. <oracle.manageddataaccess.client>
  135. <version number="*">
  136. <dataSources>
  137. <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
  138. </dataSources>
  139. </version>
  140. </oracle.manageddataaccess.client>
  141. </configuration>
  142. Documentation Corrections and Additions
  143. =======================================
  144. None
  145. Known Issues and Limitations
  146. ============================
  147. 1) BindToDirectory throws NullReferenceException on Linux when LdapConnection AuthType is Anonymous
  148. https://github.com/dotnet/runtime/issues/61683
  149. This issue is observed when using System.DirectoryServices.Protocols, version 6.0.0.
  150. To workaround the issue, use System.DirectoryServices.Protocols, version 5.0.1.
  151. Copyright (c) 2021, 2023, Oracle and/or its affiliates.