Cocould not create an environment: ocienvcreate returned-1 (ocienvcreate fails, the returned code is-1, but the error message text is unavailable)

Source: Internet
Author: User

This problem was encountered today when I connected Oracle10g with C. Windows2003 pro r2 + Oracle 10g

Cocould not create an environment: ocienvcreate returned-1

There are just a few online methods, and it is useless to try it again.

 
1. Grant the read and write permissions of the Oracle main directory oracle \ To Asp.net, iuser _... And IWAM _..., and restart the computer.
2. Open Web properties in IIS-home directory-Execute Permission [change to-script and executable file ];
3. ApplicationsProgramPool [changed to-mssharepointapppool], refresh;

 

4. Change the security properties of the properties page of the installation directory, add the ASPnet, IWAM _ machine name, And iuser _ machine name to all three users and set them to full control. Restart. Invalid.
5. Add the above three users to the Administrator group.

However, the above method fails, but now it seems that this problem mainly involves permissions and configuration. Due to the download version issue, the configuration and environment variable settings after the default installation are incomplete for 10 Gb. If the above method fails, try the following method:

1. Configure tnsnames. ora. Many configuration methods are available online.

2. Complete environment variable configuration. There are also a lot of environment variable configurations online, which are not listed here

3. The most important thing is to add the following key values to the Registry.

[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ environment]

"LD_LIBRARY_PATH" = "F: \ * \ bin"

"Nls_lang" = "american_america.zhs16gbk"

"Tns_admin" = "F: \ * \ bin"

The specific path is modified according to the actual situation. After the following key values are added to the registry, the program is re-debugged and successfully passed.

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/sunshuang1s/archive/2009/06/19/4282788.aspx

 

Reason:

After the Oracle9i client is installed, use system. Data. oracleclient to access the Oracle database. If this error occurs:
System. Data. oracleclient requires Oracle client software version 8.1.7 or greater.

Cause
When the Oracle 9i Release 2 client is installed in the NTFS partition of windows, the Security Authentication Settings are incorrect. As a result, the authenticated users user on the local machine cannot see the contents in the ORACLE_HOME directory. net to authenticated users permission to use system. data. the preceding error is reported when the oracleclient connects to the Oracle database.

Solution:
Add the following users/groups to the Oracle/bin directory and grant full permissions:
Asp.net Machine Account
Administrator
Authenticated Users
Add Asp.net to the Administrator group and restart IIS.

The above method has been practical,

There is also a solution on the Internet, which is similar and slightly different. In fact, we do not advocate adding Asp.net to the Administrator, nor allow excessive permissions. However, in the following method, it seems that it is not feasible to try:

    • Log on to Windows as administrator.
    • Start the window resource browser to find the ORACLE_HOME directory, such as c: \ oracle \ ora92.
    • Right-click the menu and select share and security for the directory (Click properties under win2000)
    • Click the "Security" tab
    • Click "Authenticated Users" in the group and user name list.
    • In the user's permission list, set the "read and run" selection box to unselected.
    • Click "read and run" again and set it to the selected status.
    • Click "advanced" and in the permission project, determine whether "Authenticated Users" has the "read and run" permission and applies it to "this folder, and subfolders and files ". if not, double-click the folder and make sure that the permission can be applied to the folder and subfolders and files ". this item is very important and you must check it.
    • Click OK.
    • Restart to make all changes take effect.

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.