In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Oracle Data Access Components ODAC(Oracle Data Access Components) are Mini programs used to access Oracle databases. These components can be programmatically invoked to access Oracle databases on computers that do not have Oracle database software installed.
Tools/raw materials
ODAC Installation Kit
Step 1. Download ODAC Installation Package
Download the ODAC installation package from Oracle's official website. Find the version you want on the website. What I downloaded is:
64-bit ODAC 11.2 Release 6 (11.2.0.4.0) Xcopy for Windows x64
The downloaded installation package is named ODAC112040Xcopy_64bit.zip
Step 2. decompression
Unzip this zip package and unzip the files inside to a folder. I unzip it to D:\ODAC112040Xcopy_64bit, then open cmd and enter this folder.
There are eight sub-folders in this folder, namely:
instantclient_11_2: This is the Oracle client on which all components depend;
oledb: This is an OLE DB component
asp.net This is an ASP.NET2 component
asp.net4: This is an ASP.NET4 component
odp.net4: This is a. NET4 component
odp.net20: This is a. NET2 component
Oramts: This is Oracle's MTS service
network: This folder does not need to be managed. It is used to store tnsname.ora files. It can only be used after installation.
Here we need to understand the dependencies between these components.
instantclient_11_2 is the most basic
oledb depends on instantclient_11_2
asp.net relies on instantclient_11_2 and odp.net20
asp.net4 depends on instantclient_11_2 and odp.net4
odp.net4 depends on instantclient_11_2
odp.net20 depends on instantclient_11_2
oramts depends on instantclient_11_2
Step 3. Install ODAC package
Run the install.bat batch file in cmd: Enter "install.bat all D:\OracleClient ODAC"(without double quotes). There are a couple of parameters that need special attention here we're passing in three parameters, but we can pass in up to four.
First parameter: all. All means install ODAC112040Xcopy_64bit folder all components and clients. If you don't need so many components and only use one of them, such as OLE DB components, you can install only the client and this OLE DB component as follows:
install.bat oledb D:\OracleClient ODAC
The second parameter is D:\OracleClient. This is the installation path, according to their own actual situation specified, as far as possible in the path do not have spaces and parentheses.
The third parameter: ODAC. This is called ORACLE HOME NAME. This parameter can also be specified as a string, not necessarily "ODAC". This parameter is used to write to the registry. For example, after the above statement is executed, it will be written in the following location of the registry: HKLM\Software\Oracle\KEY_ODAC
The ODAC after this "KEY_" is the "ODAC" you passed in the parameter.
The fourth parameter. Generally, only the first three parameters are enough. When installing a component, it will automatically install all the components it depends on. However, if you only want to install the specified component and do not want to install the components it depends on, then the fourth parameter will be used. For example: when you install ASP.NET, if you only use the first three parameters, it will automatically install odp.net20 and instantclient_11_2 on which it depends, but if you pass the fourth parameter "false", as follows:
install.bat asp.net D:\OracleClient ODAC false
Only ASP.NET will be installed and odp.net20 and instantclient_11_2 will not be installed.
Step 4. set the environment variable
ORACLE_HOME=D:\OracleClient
(Add an environment variable ORACLE_HOME, whose value is your installation path, for example, here I am D:\OracleClient)
PATH=%ORACLE_HOME%;%ORACLE_HOME%\bin;%PATH%
(Add the following two paths to PATH environment variable, separated by semicolons: %ORACLE_HOME%;%ORACLE_HOME%\bin;)
Step 5. Configure the tnsnames.ora file as needed
If you want to use components to access Oracle databases, configure the tnsnames.ora file as needed and store it in the %ORACLE_HOME%\network\admin directory.
My tnsnames.ora file format is as follows, for reference:
ORA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.26.231)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora)
)
)
Methods of Offloading ODAC
Use cmd to go to the ODAC installation path and run the install.bat batch file from that path. Note the use of parameters here.
================================================
To uninstall all components, you can do this:
uninstall.bat all ODAC
or
uninstall.bat all D:\OracleClient
================================================
To uninstall a specified component, you can do this:
uninstall.bat oledb ODAC
or
uninstall.bat oledb D:\OracleClient
Manually delete the installation directory and delete the environment variables added before.
precautions
The install.bat and install.bat batch files generate install.log and install.log logs in the installation directory, respectively.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.