I used to connect. Net to Oracle. At that time, it was the Oracle server installed on the local machine, so there was no problem with the connection. This time it will not work. The local machine is installed and there is no problem with it. However, when uploading data to the server, it will be finished and an error will be reported.
After more than a day of research, I finally found the problem. Although there were a series of problems on the internet, it did not solve my problem.
The problem is that Asp.net needs to install the driver to connect to the Oracle database.
1. Some Oracle servers can be installed.
2. Oracle provides a suggested database connection without installation. Just configure it. Name: instant Oracle
For more information about instant Oracle, see http://www.oracle.com/technetwork/database/features/oci/index.html.
Instant ORACLE: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html.
Select the operating system and Oracle version. To be registered during download. After downloading, decompress the package directly. Of course, there are some DLL files.
Install instant Oracle
In fact, you don't need to install it. Unzip it.,
Instantclient_10_2 after decompression
There are some DLL here. Mainly:
- OCI Instant Client data shared library
- Oraociei10.dll(Basic Version)
- Client code library
- Security Library
- Occi Library
Then, configure the environment variables.
System variable: In Path, add your DLL paths;
User variable: Add ORACLE_HOME, which is also the path;
Then, restart the machine. OK.
In this way, you can connect to the Oracle database on the remote server without installing oracle.