Cd F:\Software\DBSoft\ODAC112021Xcopy_x64
F:
F:\Software\DBSoft\ODAC112021Xcopy_x64\install.bat all D:\app\Administrator\product\11.2.0\client_1 OraClient11g_home1
--------------------------------------------------------------------------------------------------------------------
4. Add the install directory and install directory's bin subdirectory to the system PATH environment variable before any other Oracle directories. Otherwise, the products that are installed may not work properly as it will not be able to load the necessary DLLs. for example, if c:\oracle was provided as the install directory, add c:\oracle and c:\oracle\bin to the system PATH.
--- 环境变量
Path = D:\app\Administrator\product\11.2.0\client_1;D:\app\Administrator\product\11.2.0\client_1\bin;D:\app\Administrator\product\11.2.0\dbhome_1\bin;
5. Note that install.bat sets the value of the NLS_LANG registry key at HKLM\Sofware\Oracle\KEY_<Oracle Home Name> to AMERICAN_AMERICA.WE8MSWIN1252 by default. Please modify install.bat or change this value in the registry after the install if necessary.
---注册表
NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK
6. If OraMTS is installed, the OracleMTSRecoveryService is created with the LocalSystem account as the logon account. The credentials can be changed using the "services" administration tool. Please read the OraMTS readme.txt for details. Note that after the install or the configuration, the service will not be started, since it requires the install directory and its bin directory to be included in the system PATH.
7. Application using components from ODAC can use EZ CONNECT to connect to Oracle without depending on tnsnames.ora. Otherwise, configure or copy over tnsnames.ora from another machine and set TNS_ADMIN or ORACLE_HOME environment variable appropriately.
---环境变量
TNS_ADMIN = D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN
NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK
ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1
--------------------------------------------------------------------------------------------------------------------
如果安装 PL/SQL Developer,下载“instantclient-basic-nt-11.2.0.3”
在perference->Connection里面设置OCI Library和Oracle_Home,例如本机设置为:
Oracle Home :X\instantclient_11_2 OCI Library :X\instantclient_11_2\oci.dll--------------------------------------------------------------------------------------------------------------------
copy D:\App\Administrator\product\11.2.0\client_1\odp.net\bin\4\Oracle.DataAccess.dll C:\Windows\assembly\GAC_32\Oracle.DataAccess\4.112.2.0__89b483f429c47342\
{"Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format."}
Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. Access is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. Access is denied.
-------------------------------------------------------------------------------------------------------------------
如果安装Oracle后,配置了ODAC,又安装了一个Oracle的实例,需要重新配置系统环境
把ODAC执行放在前面,否则会提示Oracle版本冲突
如Path=D:\app\Administrator\product\11.2.0\client_1;D:\app\Administrator\product\11.2.0\client_1\bin;