While I am connecting to the Oracle DB. Initially "OCI.dll is not being accessed" error has come. I have given security permissions to oracle\bin directory then this error resolved. after it now. the Error "Could not create an environment: OCIEnvCreate returned
-1" is comming. I know it is because of no permissions to access oracle. Please Let me know how to give the permissions. Thanks & Regards Ratnakar Dutt A.V. duttavr@gmail.com
Please Mark as Answer, if it answers you, also correct me if I'm wrong.
The best solution is to apply the latest patch version for your version of client, which will run a utility that will automatically adjust permissions, as well as give you a bunch of fixes for the client itself.
If you want to adjust permissions manually though...
Cheers!
Greg
1. Log on to Windows as a user with Administrator privileges.
2. Launch Windows Explorer from the Start Menu and and navigate to the
ORACLE_HOME folder. This is typically...
- the "Ora92" folder under the "Oracle" folder
(i.e. D:\Oracle\Ora92) in Oracle9iR2
or
- the "Client_1" folder under the "Oracle\product\10.1.0" folder
(i.e. D:\Oracle\product\10.1.0\Client_1) in Oracle10gR1
or
- the "Db_1" folder under the "Oracle\product\10.1.0" folder
(i.e. D:\Oracle\product\10.1.0\Db_1) in Oracle10gR1
3. Right-click on the ORACLE_HOME folder and choose the "Properties" option
from the drop down list. A "Properties" window should appear.
4. Click on the "Security" tab of the "Properties" window.
NOTE: If you are running Windows XP and do not have a "Security" tab
please do the following:
(a) Open "Folder Options" in your Control Panel.
(b) Choose the "View" tab.
(c) Under "Advanced Settings" uncheck the option "Use simple file
sharing (Recommended)".
The "Security" tab should now be available.
5. Click on "Authenticated Users" item in the "Name" list (on Windows XP
the "Name" list is called "Group or user names").
6. Uncheck the "Read and Execute" box in the "Permissions" list under the
"Allow" column (on Windows XP the "Permissions" list is called
"Permissions for Authenticated Users").
7. Re-check the "Read and Execute" box under the "Allow" column (this is
the box you just unchecked).
8. Click the "Advanced" button and in the "Permission Entries" list make
sure you see the "Authenticated Users" listed there with:
Permission = Read & Execute
Apply To = This folder, subfolders and files
If this is NOT the case, edit that line and make sure the "Apply onto"
drop-down box is set to "This folder, subfolders and files". This
should already be set properly but it is important that you verify this.
9. Click the "Ok" button until you close out all of the security properties
windows. The cursor may present the hour glass for a few seconds as it
applies the permissions you just changed to all subfolders and files.
10. You must REBOOT YOUR COMPUTER to assure that these changes have taken
effect. Failure to do this can prevent this procedure from working!
11. Re-execute the application and it should now work.
NOTE: If the problem is still present after following steps 1-11 and
rebooting your computer in step 10 you should perform the following
two additional permissions settings at step 8 as described below.
This may be necessary due to permissions that have been configured
beyond the standard permissions setup when the OS was originally
installed:
12. If the problem is still present, go back through these same 11 steps
above, but when performing step 8 additionally check both boxes entitled
"Inherit from parent the permission entries that apply to child
objects. Include these with entries explicitly defined here."
AND
"Replace permission entries on all child objects with entries shown
here that apply to child objects"
duttavr
Contributor
4035 Points
1079 Posts
Could not create an environment: OCIEnvCreate returned -1
Jul 27, 2006 11:08 AM|LINK
Please Mark as Answer, if it answers you, also correct me if I'm wrong.
greg.darling
Participant
1458 Points
310 Posts
Re: Could not create an environment: OCIEnvCreate returned -1
Jul 27, 2006 06:36 PM|LINK
Hi,
The best solution is to apply the latest patch version for your version of client, which will run a utility that will automatically adjust permissions, as well as give you a bunch of fixes for the client itself.
If you want to adjust permissions manually though...
Cheers!
Greg
1. Log on to Windows as a user with Administrator privileges.
2. Launch Windows Explorer from the Start Menu and and navigate to the
ORACLE_HOME folder. This is typically...
- the "Ora92" folder under the "Oracle" folder
(i.e. D:\Oracle\Ora92) in Oracle9iR2
or
- the "Client_1" folder under the "Oracle\product\10.1.0" folder
(i.e. D:\Oracle\product\10.1.0\Client_1) in Oracle10gR1
or
- the "Db_1" folder under the "Oracle\product\10.1.0" folder
(i.e. D:\Oracle\product\10.1.0\Db_1) in Oracle10gR1
3. Right-click on the ORACLE_HOME folder and choose the "Properties" option
from the drop down list. A "Properties" window should appear.
4. Click on the "Security" tab of the "Properties" window.
NOTE: If you are running Windows XP and do not have a "Security" tab
please do the following:
(a) Open "Folder Options" in your Control Panel.
(b) Choose the "View" tab.
(c) Under "Advanced Settings" uncheck the option "Use simple file
sharing (Recommended)".
The "Security" tab should now be available.
5. Click on "Authenticated Users" item in the "Name" list (on Windows XP
the "Name" list is called "Group or user names").
6. Uncheck the "Read and Execute" box in the "Permissions" list under the
"Allow" column (on Windows XP the "Permissions" list is called
"Permissions for Authenticated Users").
7. Re-check the "Read and Execute" box under the "Allow" column (this is
the box you just unchecked).
8. Click the "Advanced" button and in the "Permission Entries" list make
sure you see the "Authenticated Users" listed there with:
Permission = Read & Execute
Apply To = This folder, subfolders and files
If this is NOT the case, edit that line and make sure the "Apply onto"
drop-down box is set to "This folder, subfolders and files". This
should already be set properly but it is important that you verify this.
9. Click the "Ok" button until you close out all of the security properties
windows. The cursor may present the hour glass for a few seconds as it
applies the permissions you just changed to all subfolders and files.
10. You must REBOOT YOUR COMPUTER to assure that these changes have taken
effect. Failure to do this can prevent this procedure from working!
11. Re-execute the application and it should now work.
NOTE: If the problem is still present after following steps 1-11 and
rebooting your computer in step 10 you should perform the following
two additional permissions settings at step 8 as described below.
This may be necessary due to permissions that have been configured
beyond the standard permissions setup when the OS was originally
installed:
12. If the problem is still present, go back through these same 11 steps
above, but when performing step 8 additionally check both boxes entitled
"Inherit from parent the permission entries that apply to child
objects. Include these with entries explicitly defined here."
AND
"Replace permission entries on all child objects with entries shown
here that apply to child objects"
AND be sure to reboot in step 10.
rogerperkins
Member
16 Points
9 Posts
Re: Could not create an environment: OCIEnvCreate returned -1
Aug 02, 2012 10:29 PM|LINK
Renaming the old version of the oci.dll file in the windows/system32 folder worked for me.