Debug the OCI-Linux Release Technology-debian Information On Debian. The following is a detailed description. Several problems occurred one after another when debugging OCI On debian. google and baidu have been around for a long time, and N-plus messy materials have finally been reviewed.
1. The first problem is the setting of environment variables in debian ,~ /. Bash_profile setting. It does not work after logon ~ /. Set in the bashrc file, set to view $ ORACLE_HOME, $ ORACLE_SID variables have been set, but does not work, it is very depressing. In desperation, keep the/etc/profile settings and clear them by mistake ~ /. Bashrc content, add a line of source/etc/profile and log on again. Hahaha can use it.
2. in the oci example, all header files required for OCI programming are stored in the rdbms directory. The C_INCLUDE_PATH path I set is $ ORACLE_HOME/rdbms/demo: $ ORACLE_HOME/rdbms/public, then gcc-o demo-I $ C_INCLUDE_PATH-L $ ORACLE_HOME/lib-lclntsn xxxx. c. compiled.
3. Execute. If you do not copy the shared library under $ ORACLE_HOME/lib to/usr/lib, or the shared library is in the same directory as the running OCI program, then this program will report N multi-method can not find the Error; If ORACLE_HOME is not set, it will report "error while trying to retrieve text for Error ORA-01019 ".
4. Connect to the remote server. If $ ORACLE_HOME/network/admin/tnsnames. ora is not correctly configured, the remote server cannot be connected.
According to the debugging in the past few days, it is found that since multiple oracle databases, configuration files, and drivers are required, the oci program must be correctly executed on the machine where the oracle client is installed at least, the specific results will be tested on a machine without a client tomorrow.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service