IMPOSSIBLE TASK: Connect to Oracle 8 database using Active Server Pages 
Author Message
 IMPOSSIBLE TASK: Connect to Oracle 8 database using Active Server Pages

I am finding it utterly impossible to connect to an Oracle 8 database using
Active Server Pages.  I've read every piece of literature I can find on this
subject, am familiar with all the known bugs, have followed all suggestions,
input supposedly-working example code verbatim, an it still will not work.

Would appreciate any info, email preferred, will post followup with fixes if
there is indeed a fix.

Mark Alsip
Contractor to KY Dept of Insurance

-----*** My environment:
    Windows NT V4/SP3.
    Oracle 8.0.5 server & ODBC driver (with 8.0.51b patch applied to ODBC).
    Also have Microsoft MDAC V2 with their ODBC driver for Oracle.
    IIS V3 with Active Server Pages.
   All above run on the same system.
    32-bit DSN's defined for both Oracle and Microsoft ODBC connections to
target database.

-----*** Tests:
    Oracle ODBC test against both DSN's works perfectly.
    Database can be accessed flawlessly via Visual Basic and either ODBC
driver installed on a client
      machine across the network.
    Database can be accessed locally and across the network using SQL
Worksheet or SQL Plus

-----*** My ASP code snippet using Microsoft ODBC driver for Oracle:

  Set db = Server.CreateObject("ADODB.Connection")
  db.open "DSN=KYDOI_MS;UID=DOI;PWD=blahblah;"

This code fails with:
  Microsoft OLE DB Provider for ODBC Drivers error '80004005'
  Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV
failed

-----*** My ASP code snippet using  Oracle driver:

  Set db = Server.CreateObject("ADODB.Connection")
  db.open "DSN=KYDOI;UID=DOI;PWD=blahblah;"

This code fails with:
    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    Specified driver could not be loaded due to system error 5 (Oracle ODBC
Driver).



Sat, 21 Apr 2001 03:00:00 GMT  
 IMPOSSIBLE TASK: Connect to Oracle 8 database using Active Server Pages
I hope this will help you.

Yesterday, we were able to connect IIS 4.0 and Oracle 8.0. Does that sound
sweet! We were in your state until we got it up and running. Thanks to the
smart guy named Wade Erickson who really dug deep and found that hidden
information needed to setup SQL-Net.

OK, here's the tip. The problem is that Oracle has a listener. It listens at
a certain port which you probably know by now. Once SQL-Net accepts a
request it replies back and tells the client to connect to another port.

The solution there is to make the port number fixed to a certain number.
Make it equal to the SQL-Net listening port. Tweak the registry to change
the value. I can't publish the details because I am not Wade. So look for it
in the HTML manual, it is there.

Thanks.

Quote:

>I am finding it utterly impossible to connect to an Oracle 8 database using
>Active Server Pages.  I've read every piece of literature I can find on
this
>subject, am familiar with all the known bugs, have followed all
suggestions,
>input supposedly-working example code verbatim, an it still will not work.

>Would appreciate any info, email preferred, will post followup with fixes
if
>there is indeed a fix.

>Mark Alsip
>Contractor to KY Dept of Insurance

>-----*** My environment:
>    Windows NT V4/SP3.
>    Oracle 8.0.5 server & ODBC driver (with 8.0.51b patch applied to ODBC).
>    Also have Microsoft MDAC V2 with their ODBC driver for Oracle.
>    IIS V3 with Active Server Pages.
>   All above run on the same system.
>    32-bit DSN's defined for both Oracle and Microsoft ODBC connections to
>target database.

>-----*** Tests:
>    Oracle ODBC test against both DSN's works perfectly.
>    Database can be accessed flawlessly via Visual Basic and either ODBC
>driver installed on a client
>      machine across the network.
>    Database can be accessed locally and across the network using SQL
>Worksheet or SQL Plus

>-----*** My ASP code snippet using Microsoft ODBC driver for Oracle:

>  Set db = Server.CreateObject("ADODB.Connection")
>  db.open "DSN=KYDOI_MS;UID=DOI;PWD=blahblah;"

>This code fails with:
>  Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>  Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV
>failed

>-----*** My ASP code snippet using  Oracle driver:

>  Set db = Server.CreateObject("ADODB.Connection")
>  db.open "DSN=KYDOI;UID=DOI;PWD=blahblah;"

>This code fails with:
>    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>    Specified driver could not be loaded due to system error 5 (Oracle ODBC
>Driver).



Thu, 26 Apr 2001 03:00:00 GMT  
 IMPOSSIBLE TASK: Connect to Oracle 8 database using Active Server Pages
I promised a followup if I found an answer to my own question.  I did, and
here it is, straight from the mouths of Oracle:

"System error 5" is an undocumented (or poorly documented) error message
that means "some Oracle component didn't have privileges for some object."

Whoopie...

The suggestion was to check the privs on the ODBC DLL's.  I did that, all
looked OK, but to be sure I temporarily gave Everyone group Full Control.

Still wouldn't work.

I then went hunting for the file(s) where the database server and/or IIS
didn't have sufficient privs.  It turned out to be one or more files in my
Oracle Home directory.  This just blows me away, but it is true.
*Something* is invoked by the IIS-ODBC-Oracle connection that *is not*
invoked by the regular NetworkClient-ODBC-Oracle connection.  I have yet to
narrow the problem to the actual file(s) in question.  Neither has Oracle
for that matter, they asked that I contact them when I find them.

Thanks to all who wrote about the Listener problem, I had already found that
one but it's good to get a refresher.

Mark

Quote:

>I am finding it utterly impossible to connect to an Oracle 8 database using
>Active Server Pages.  I've read every piece of literature I can find on
this
>subject, am familiar with all the known bugs, have followed all
suggestions,
>input supposedly-working example code verbatim, an it still will not work.

>Would appreciate any info, email preferred, will post followup with fixes
if
>there is indeed a fix.

>Mark Alsip
>Contractor to KY Dept of Insurance

>-----*** My environment:
>    Windows NT V4/SP3.
>    Oracle 8.0.5 server & ODBC driver (with 8.0.51b patch applied to ODBC).
>    Also have Microsoft MDAC V2 with their ODBC driver for Oracle.
>    IIS V3 with Active Server Pages.
>   All above run on the same system.
>    32-bit DSN's defined for both Oracle and Microsoft ODBC connections to
>target database.

>-----*** Tests:
>    Oracle ODBC test against both DSN's works perfectly.
>    Database can be accessed flawlessly via Visual Basic and either ODBC
>driver installed on a client
>      machine across the network.
>    Database can be accessed locally and across the network using SQL
>Worksheet or SQL Plus

>-----*** My ASP code snippet using Microsoft ODBC driver for Oracle:

>  Set db = Server.CreateObject("ADODB.Connection")
>  db.open "DSN=KYDOI_MS;UID=DOI;PWD=blahblah;"

>This code fails with:
>  Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>  Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV
>failed

>-----*** My ASP code snippet using  Oracle driver:

>  Set db = Server.CreateObject("ADODB.Connection")
>  db.open "DSN=KYDOI;UID=DOI;PWD=blahblah;"

>This code fails with:
>    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>    Specified driver could not be loaded due to system error 5 (Oracle ODBC
>Driver).



Tue, 01 May 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Oracle and Active Server Pages

2. Connecting oracle ( Unix server ) from windows mc using vb

3. Databases and Active Server Pages

4. Active Server Page and Informix Database

5. How to connect to an Oracle database using Access

6. Dynamic Access Reports using Active Server Pages

7. Help: Using movelast on Active Server Page

8. Problem connecting to Oracle Database using ODBC

9. Using VB with Active Server Pages

10. Unpack/unzip text files with Active Server Pages using VBscript

11. Using SNMP commands from an Active Server Page

12. How to connect to an Oracle database using the native driver

 

 
Powered by phpBB® Forum Software