Oracle
Last edited July 22, 2008
More by whosit »
아래의 문서(Notify#215255.1-Unable to Connect to Database with Oracle Client Software for Windows / from Oracle Metalink Repository)를 우선 검토한 후에 점검사항이 있는지 확인해주시기 바랍니다.


Problem Description
-------------------

When running an application using any of these versions of the Oracle client
software for Windows

o Oracle9i Release 2 (9.2.0.1.0)
o Oracle10g Release 1 (10.1.0.2.0)

and you attempt to connect to an Oracle database through an environment that
uses the "Authenticated User" group

NOTE: This typically occurs when running applications from inside
Microsoft's Internet Information Server (IIS)) that connect to Oracle

through any of these programmatic interfaces

1. Oracle Provider for OLE DB
2. Microsoft OLE DB Provider for Oracle
3. Oracle ODBC Driver
4. Microsoft ODBC for Oracle
5. Oracle Objects for OLE (OO4O)
6. Microsoft .NET Framework Data Provider for Oracle

you may receive one of the following errors:


(1) Oracle Provider for OLE DB

(a) Error Type: Microsoft OLE DB Service Components (0x80070005)

Access is denied.


(b) OraOLEDB.Oracle Provider is not registered on the local machine


(c) SQL Server Enterprise Manager (Using a Linked Server)

Error 7311: Could not obtain the schema rowset from OLE DB provider
'UNKNOWN'. The provider supports the interface, but returns
failure code when it is used.

OLE DB error trace [OLE/DB Provider 'UNKNOWN'
IDBSSchemaRowset::GetRowset returned 0x80040e37: ].

(d) OLEDBException: TNS-12154: TNS could not resolve service name

(e) Run-time error '3706':

Provider cannot be found. It may not be properly installed.


(2) Microsoft OLE DB Provider for Oracle

(a) Error Type: Microsoft OLE DB Provider for Oracle (0x80004005)

Oracle client and networking components were not found. These
components are supplied by Oracle Corporation and are part of the
Oracle Version 7.3.3 or later client software installation. Provider
is unable to function until these components are installed.


(b) Error Type: Microsoft OLE DB Provider for Oracle (0x80004005)

Oracle error occurred, but error message could not be retrieved
from Oracle.


(c) SQL Server Enterprise Manager (Using a Linked Server)

Error 7399: OLE DB Provider 'MSDAORA' reported an error.

OLE DB error trace [OLE/DB Provider 'MSDAORA'
IDBInitialize::Initialize returned 0x80004005: ].


(3) Oracle ODBC Driver

(a) Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

Specified driver could not be loaded due to system error 5 (Oracle
in OraHome92).

(b) Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and
no default driver specified

(c) SQLSTATE: IM004
Native Error Code: 0
Driver Message: [Microsoft][ODBC Driver Manager] Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.


(4) Microsoft ODBC for Oracle

(a) The Oracle(tm) client and networking components were not found.
These components are supplied by Oracle Corporation and are part
of the Oracle Version 7.3 (or greater) client software installation.

You will be unable to use this driver until these components have
been installed.


(b) Error number: -2147467259

Error Description: [Microsoft][ODBC Driver Manager] Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed


(5) Oracle Objects for OLE

(a) while using a GLOBAL.ASA file

Error Type: Active Server Pages (0x0)

An error occurred while creating object 'OraSession'.


(b) not using a GLOBAL.ASA file

Error Type: Microsoft VBScript runtime (0x800A0046)

Permission denied: 'CreateObject'


(6) Microsoft .NET Framework Data Provider for Oracle

(a) System.DllNotFoundException: Unable to load DLL (oci.dll).
at System.Data.OracleClient.DBObjectPool.GetObject(Boolean&
isInTransaction)
at System.Data.OracleClient.OracleConnectionPoolManager.
GetPooledConnection(String encryptedConnectionString,
OracleConnectionString options, Boolean& isInTransaction)
at System.Data.OracleClient.OracleConnection.OpenInternal
(OracleConnectionString parsedConnectionString, Object transact)
at System.Data.OracleClient.OracleConnection.Open()
at WCWSItemAvailability.ETAAvailability.SingleAvailability(String
ItemNumber, String BusinessUnit, Int32 OrderQty, Int32&
AvailableQty, Int32& OnHandQty, String& ETADate, Int32& Error)
at WCWSItemAvailability.ETAAvailability.XMLAvailability(String
XMLInput)

(b) Server Error in '<name>' Application.

Could not create an environment: OCIEnvCreate returned -1.

Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Exception: Could not create an environment:
OCIEnvCreate returned -1.
Stack Trace:

[Exception: Could not create an environment: OCIEnvCreate returned
-1.]
System.Data.OracleClient.DBObjectPool.GetObject(Boolean&
isInTransaction) +467
System.Data.OracleClient.OracleConnectionPoolManager.
GetPooledConnection(String encryptedConnectionString,
OracleConnectionString options, Boolean& isInTransaction) +165
System.Data.OracleClient.OracleConnection.OpenInternal
(OracleConnectionString parsedConnectionString, Object transact)
+836
System.Data.OracleClient.OracleConnection.Open() +32

(c) Unable to find entry point named OCIEnvCreate in OCI.DLL


(7) Oracle Data Provider for .NET (ODP.NET)

(a) ORA-01012: not logged on

(b) ORA-12154 "TNS:could not resolve service name"


(8) Other miscellaneous errors

(a) The Specified Module Could Not Be Found

(b) ORA-00604: error occurred at recursive SQL level 1
ORA-12705: invalid or unknown NLS parameter value specified

(c) Unable to load DLL (OraOps9.dll):
...
[DllNotFoundException: Unable to load DLL (OraOps9.dll).]

(d) System Error 998 trying to run ASP page

(e) Your OCI application returns a -1 when calling OCIEnvCreate

(f) You receive an Access Violation Exception from OraGeneric9.dll when
trying to write to memory.


Solution Description
--------------------

There are two ways to resolve this problem:

SOLUTION 1 - If you must remain on the current version of the client software
this solution will step you through the manual process for
fixing the permissions problem.

SOLUTION 2 - If you are able to patch your client software to a later version
this solution will advise you on what patch to apply to resolve
this problem.

NOTE - If you are using the Oracle10g Instant Client you MUST follow
SOLUTION 1.


SOLUTION 1
==========

Oracle Client software requires that you give the Authenticated User
privilege to the Oracle Home by following these steps:

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.


SOLUTION 2
==========

If you are running Oracle9i Release 2 (9.2.0.1.0) client software please
apply the following 9.2.0.4.0 patch OR LATER (i.e. 9.2.0.x.x):

* Patch Number: 3095277
Description: 9.2.0.4 PATCH SET FOR ORACLE DATABASE SERVER
Product: Oracle Database Family
Release: Oracle 9.2.0.4
Platform: Microsoft Windows (32-bit)
Last Uploaded: 11-SEP-2003
Size: 256M (269101182 bytes)


If you are running Oracle10g Release 1 (10.1.0.2.0) client software please
apply the following 10.1.0.3.0 patch OR LATER (i.e. 10.1.0.x.x):

* Patch Number: 3761843
Description: 10.1.0.3 PATCH SET FOR ORACLE DATABASE SERVER
Product: Oracle Database Family
Release: Oracle 10.1.0.3
Platform: Microsoft Windows (32-bit)
Last Uploaded: 22-AUG-2004
Size: 447M (469761432 bytes)


* NOTE: Although these patches appear to be database-only patches they can
also be applied to the client software as well. See the patch
release notes for more information on how to install the patch onto
client software.


Explanation
-----------

If you install Oracle9i Release 2 (9.2.0.1.0) or Oracle10g Release 1
(10.1.0.2.0) client software on a computer running Windows with an NTFS
partition, the contents of ORACLE_HOME directory will not be visible to users
who are authenticated on that machine. These permissions were not set properly
when the software was installed.

Applications that were working fine with previous versions of Oracle software
will stop working when they upgrade to Oracle 9.2 or 10.1.

NOTE: The application will continue to work if it runs as the Administrator
of the machine.

Any application that is using the Authenticated User or possibly another
privilege will not work. A notable example would be IIS which might service
some of the requests based on the Authenticated User privileges.

To demonstrate the problem in further detail, you can log on to the operating
system as an authenticated machine user. You won't be able browse the contents
of the ORACLE_HOME directory demonstrating your inability to load any Oracle
DLLs or make a connection.


Additional Information
----------------------

The above error messages may not only be encountered when using Oracle 9.2 or
10.1 client software but may also exist when running into general permissions
issues using third party products accessing Oracle on a Windows platform.


References
----------

Bug 2498880 - Oracle 9I Release 2 Installation Issue on Windows 2000 NTFS
File System (9.2.0.1.0)

Bug 3067666 - ORAWSFIX9.EXE Doesn't Run when Patching Client Only Install
(9.2.0.3.0)

Bug 3671964 - OUI Does Not Properly Set File Permissions on Oracle Home
Directory (10.1.0.2.0)
Problem
Oracle9i Client로 System.Data.OracleClient를 사용할때,
ASP.NET 애플리케이션으로 오라클 데이터베이스에 연결하는 동안 다음과 같은 메시지가 뜹니다.

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.

Cause
Security permissions were not properly set when the Oracle 9i Release 2 client was installed on Windows with NTFS. The result of this is that content of the ORACLE_HOME directory is not visible to Authenticated Users on the machine; this again causes an error while the System.Data.OracleClient is communicating with the Oracle Connectivity software from an ASP.NET using Authenticated User privileges.

Solution
문제를 해결하기 위해서는 Authenticated Users group privilege를 Oracle Home 디렉토리에 주어야 합니다.

1. Administrator 권한을 가진 사용자로 로그온합니다.
2. 윈도우 탐색기를 실행하고, ORACLE_HOME 폴더로 이동합니다.
*모를경우, ctrl+r --> regedit --> ctrl+f --> oracle_home 이라고 치면 위치가 나옵니다.
3. ORACLE_HOME 폴더의 등록정보를 봅니다.
4. 등록정보의 보안탭으로 이동합니다.
5. "이름" 항목에 “Authenticated Users” 를 클릭합니다.
6. 사용권한 항목의 '허용'열의 밑에 있는 "읽기 및 실행"을 체크해제합니다.
7. 사용권한 항목의 '허용'열의 밑에 있는 "읽기 및 실행"을 다시체크합니다.
8. '고급' 버튼을 누르고, '사용권한'탭의 사용권한 항목에서 “Authenticated Users”가 사용권한="읽기 및 실행", 적용대상="이 폴더, 하위폴더 및 파일"로 되어있는지 확인하세요. 만약 아니라면 해당 행을 더블클릭해 위와 같이 수정하세요.
이것은 이미 적당하게 설치되어 있습니다. 그러나 위와같이 확인하는 것이 중요합니다.
9. '확인'을 눌러 보안탭으로 돌아온후 다시 '확인'을 누릅니다. 그러면 새로 변환된 권한들을 모든 하위 폴더 밒 파일들에 적용시킵니다.
10. 변경 내용을 적용하기 위해 재부팅합니다.
11. 어플리케이션을 다시 시작합니다.
The content on this page is provided by a Google Notebook user, and Google assumes no responsibility for this content.