Do not install the Oracle10g client to connect to the Oracle10g Database

Source: Internet
Author: User

The method is as follows: (Environment: Vs2008 + Oracle10g)

1. Extract the files in instantclient-basic-win32-10.2.0.4.zip to the specified location (I decompress the files to D: \ fox and name them instantclient)
The content should include nine files: BASIC_README, oci. dll, ocijdbc10.dll, ociw32.dll, orannzsbb10.dll, oraocci10.dll, oraociei10.dll, classes12.jar, and ojdbc14.jar.
(Note: accept)

2. Add the tnsnames. ora file (to the D: \ fox \ instantclient file ):
The content of the tnsnames. ora file:
# Tnsnames. ora Network Configuration File: D: \ fox \ instantclient \ tnsnames. ora/* This is the File address */
# Generated by Oracle configuration tools.

ORCL1 =/* This is the service name of the local Oracle server, which is used in the Code */
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = server address ip address or server name) (PORT = server PORT number, "1521" by default)
)
(CONNECT_DATA =
(SERVICE_NAME = Name of the server database service. Default Value: "orcl")
)
)

 

3. Add the Registry content: (the content is as follows. Change the file location as needed)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Environment]
"LD_LIBRARY_PATH" = "D :\\ fox \ instantclient"
"TNS_ADMIN" = "D :\\ fox \ instantclient"
"NLS_LANG" = "AMERICAN_AMERICA.ZHS16GBK"

4. Add Environment Variables

Right-click "my computer"> "properties"> "advanced"> "environment variables"> "system variables"> select "Path"> "edit" --> Add "after" variable value "original data "; d: \ fox \ instantclient"

 

5. restart the computer.

This article from the CSDN blog, reproduced from: http://blog.csdn.net/lhg0302/archive/2009/04/11/4062569.aspx

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.