How to install Oracle free to use PL/SQL developer, http://www.cnblogs.com/volnet/archive/2012/05/22/2513728.html
This article needs to support. net at the same time on a host.ProgramWhether compiled into x86 or x64, OK is required.
1. Download two versions of Oracle Data Access Components (odac) xcopy:
X86: http://www.oracle.com/technetwork/database/windows/downloads/index-101290.html
X64: http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html
2. read readme.
Take one of them as an example, and the other operation steps are the same.
3. decompress the package to any folder (temporary files can be deleted later)
Start 3.1-> Run-> cmd-> Cd this folder
3.2 run the command install. bat all {target path: directory to be installed} odac
For other parameters, see readme.
3.3 Add it to system environment variables:
Add: C: \ oracle \ odac112030xcopy_32bit; C: \ oracle \ drivers \ bin; C: \ oracle \ odac112030xcopy_x64; C: \ oracle \ odac112030xcopy_x64 \ bin;
The value is based on the actual situation.
4. test:
To write a console program, the program must reference oracle. dataaccess. dll (And set property-> copy local-> true), The path is in:
D: \ oracle \ odac112030xcopy_32bit \ odp.net \ bin \ 4 \ oracle. dataaccess. dll
Or
D: \ oracle \ odac112030xcopy_x64 \ odp.net \ bin \ 4 \ oracle. dataaccess. dll
During compilation, you can select x86/x64 as the compilation option for this project.
In
Using System; Using System. Collections. Generic; Using System. LINQ; Using System. text; Using System. configuration; // Using system. Data. oracleclient; Using Oracle. dataaccess. client; Namespace Oracletest { Class Program { Static void Main ( String [] ARGs ){ Using ( Oracleconnection Conn = New Oracleconnection ( Configurationmanager . Deleetask [ "Oracleconnectionstring" ]) {Try {Conn. open (); Console . Writeline ( "Successful! \ R \ n" );} Catch ( Exception Ex ){ Console . Writeline ( "Error" + Ex. tostring () + "\ R \ n" );} Finally {Conn. Dispose ();}}Console . Readkey ();}}}
5. Use xcopy to deploy servers
The server here can also refer to another machine. Suppose it is a newly installed Windows
Copy the installed file to a path on the machine:
Copy D: \ oracle \ odac112030xcopy_32bit and D: \ oracle \ odac112030xcopy_x64 to c: \ oracle (or other files) on the server ).
Add a path to the path of the system environment variable and copy locally compiled programs to the server. Both x86 and x64 compiled programs can run correctly.
6. PL/SQL developer supplement.
In the previous articleArticleIn http://www.cnblogs.com/volnet/archive/2012/05/22/2513728.html, we use the Instant Client to set PL/SQL preferences. Now you can remove them. Because we have already set the path in the environment variable. PL/SQL only supports x86 OCI. dll. Therefore, when setting the environment path, you should put the 32bit related path in front so that it can run correctly.
7. Set the character set. You can use the token in the previous article.
The following method is only applicable to the machine that directly installs. bat.
As mentioned in the previous article, you can modify the registry and view oracle in the path D: \ oracle \ odac112030xcopy_32bit \ bin. the key can be found in this position: Software \ wow6432node \ oracle \ key_odac modify nls_lang to simplified chinese_china.zhs16gbk.
8. Set tnsnames. ora
If you are not using a program to directly find the path, but looking for tnsnames. ora through system configuration, you need to add Network \ admin \ tnsnames. ora under the corresponding path. The procedure is as follows: http://www.cnblogs.com/volnet/archive/2012/05/22/2513728.html.
For example, tnsnames is required for PL/SQL. ora, you need to establish network \ admin \ tnsnames in the C: \ oracle \ odac112030xcopy_32bit path. ora, but it does not need to be created in c: \ oracle \ odac112030xcopy_x64.
9. In addition, if the program in IIS needs to access Oracle locally, including using Oracle. dataaccess and system. data. oracleclient access may only be available after the computer is restarted.