Forum Moderators: DixonJones

Message Too Old, No Replies

Re: ODBC Logging with ORACLE

IIS ODBC logging to Oracle

         

northj

8:21 pm on Nov 7, 2003 (gmt 0)



Follow up to Sept 4, 2003 posting by lucib23
<http://www.webmasterworld.com/forum39/1478.htm>
(Could not post a standard reply, message was too old).

When IIS attempts to insert a log entry, it quotes the fields names:
INSERT INTO INTERNETLOG ("ClientHost", "username", "LogTime", ... ) VALUES (...)

As a result, Oracle tries to do a case-sensitive match of the field names, which fails unless the table was created with case-sensitive (quoted) field names.

To fix the problem, drop the table and recreate it with quoted field names:

CREATE TABLE InternetLog
(
"ClientHost" VARCHAR2(255),
"username" VARCHAR2(255),
"LogTime" DATE,
"service" VARCHAR2( 255),
"machine" VARCHAR2( 255),
"serverip" VARCHAR2( 50),
"processingtime" NUMBER,
"bytesrecvd" NUMBER,
"bytessent" NUMBER,
"servicestatus" NUMBER,
"win32status" NUMBER,
"operation" VARCHAR2( 255),
"target" VARCHAR2(255),
"parameters" VARCHAR2(255)
)

sun818

8:32 pm on Nov 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can also see what queries were recenty run in Oracle by querying the v$sqlarea table. You should leave ODBC logging off by default and only use it for troubleshooting.