You cannot import the TIME_TAKEN field values from the extended IIS logging properties of the IIS log (910251)



The information in this article applies to:

  • Microsoft Commerce Server 2002

SYMPTOMS

In Microsoft Commerce Server 2002, you cannot import the TIME-TAKEN field values from the extended Microsoft Internet Information Services (IIS) logging properties of the IIS log.

WORKAROUND

To work around this problem, you can extend the Commerce Server 2002 Data Warehouse schema. To do this, use the following code.
'----------------------------------------------------------------
'This program provides the sample code for extending the Commerce Server 2002 Data Warehouse schema by using 
'Microsoft OLE DB Provider for Commerce Server and the ADO API by using the Microsoft Visual Basic Scripting Edition (VBScript) language.
'This program creates a member of the Request class to implement the TIME-TAKEN field.
'----------------------------------------------------------------

'1. Set connections
'----- Set Provider connection -----
'ADO 2.5 connect string

'Note You must modify the connection string to match the environment.

strURL = "URL=mscop://InProcConnect/Server=SQLSERVER:database=cs2002StarterSite_dw:catalog=DWSChema:user=sa:password=password:FASTLOAD=True"

Dim oCn
Dim oCmd

set oCn = createobject("ADODB.Connection")
set oCmd = createobject("ADODB.Command")

oCn.Open strURL 'Open the connection to the OLE DB provider.
Set oCmd.ActiveConnection = oCn

Wscript.Echo "BEGIN!"

'-------------------------------------------------
' Turn on schema change mode.
'------------------------------------------------
oCmd.CommandText = "SchemaMode=1"
oCmd.Execute
Wscript.Echo "Schema mode set..."

Const adModeWrite = 3
Const adCreateOverwrite = 2

'---------------------------------------------------------------
'Create a TIME-TAKEN member in the Request class.
'---------------------------------------------------------------
Set recNew = CreateObject("ADODB.Record")
recNew.Open "Member/Request/TimeTaken", oCn, _
adModeWrite, adCreateOverwrite

'Set the attributes.
recNew("ClassDefName") = "Request"
recNew("TypeName") = "ULONG"
recNew("Description") = "Time Taken for a request."
recNew("IsPrimaryKey") = 0
recNew("DefaultValueAsStr") = "{00000000-0000-0000-0000-000000000000}"
recNew("MemberDefName") = "TimeTaken"
recNew("GenerateColumnDef") = 1

'Save the new row.
recNew("__Commit") = 1
recNew.Fields.Update
recNew.Close
'-------------------------------------------------
' Commit the schema.
'-------------------------------------------------
oCmd.CommandText = "CommitSchema"
oCmd.Execute

'-------------------------------------------------
' Turn off schema change mode.
'------------------------------------------------
oCmd.CommandText = "SchemaMode=0"
oCmd.Execute

set oCn = nothing 'data flush here for fastload set oCmd = nothing set recNew = nothing

WScript.Echo "End!"

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:2/8/2006
Keywords:kbinfo kbhowto kbprb KB910251 kbAudDeveloper kbAudITPRO