This is the third part of the series about converting Hummingbird DM / OpenText eDOCS DM server logs to XML for further processing, e.g. for statistical analysis or for finding performance bottlenecks in SQL queries.
You can download the compiled tool from my Google drive. Here is the link: EDocsLogParser
The tool requires .NET Framework 4.0 or later, which I believe you already have on your Windows system.
Usage:
DOCSSQL: [0ECE9D58] SQLObject at 10D48F58 acquired existing connection from pool #1
********** 13:59:28.871 [0ECE9D58] DOCSSQL: EXECute SQL Statement on Library:MYLIB - MYDB (Oracle7) **********
Autocommit is ON
STATEMENT:
SELECT DOCSADM.APPS.APPLICATION,DOCSADM.APPS.DESCRIPTION,'AMBIENT_PROPERTY' UNK1,DOCSADM.APPS.SYSTEM_ID,'' FROM DOCSADM.APPS WHERE (SYSTEM_ID != 0) AND ((DOCSADM.APPS.APPLICATION = 'MS WORD')) AND (DOCSADM.APPS.DISABLED NOT IN ('Y','T','1') OR DOCSADM.APPS.DISABLED IS NULL) ORDER BY DOCSADM.APPS.APPLICATION ASC
TIMER: [0ECE9D58] ODBCHandle::ReadItem(): 15 milliseconds Fetched first row
DOCSSQL: [0ECE9D58] ODBCHandle::IssueCommand(): Statement returned results. 32 rows per fetch. 5248 bytes allocated for result sets.
TIMER: [0ECE9D58] ODBCHandle::IssueCommand(): 22 milliseconds
DOCSSQL: [0ECE9D58] ODBCHandle::ClearResults(): 1 row(s) fetched
DOCSSQL: [0ECE9D58] SQLObject at 10D48F58 released connection back to pool
The resultant XML file:
<?xml version="1.0"?>
<ArrayOfBaseEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<BaseEvent xsi:type="SqlEvent" key="0ECE9D58" connection="1" isNew="False">
<Queries>
<SqlQueryEvent time="13:59:28.871" readItemDuration="0.015" issueCommandDuration="0.022">
<Command>SELECT DOCSADM.APPS.APPLICATION,DOCSADM.APPS.DESCRIPTION,'AMBIENT_PROPERTY' UNK1,DOCSADM.APPS.SYSTEM_ID,'' FROM DOCSADM.APPS WHERE (SYSTEM_ID != 0) AND ((DOCSADM.APPS.APPLICATION = 'MS WORD')) AND (DOCSADM.APPS.DISABLED NOT IN ('Y','T','1') OR DOCSADM.APPS.DISABLED IS NULL) ORDER BY DOCSADM.APPS.APPLICATION ASC</Command>
</SqlQueryEvent>
</Queries>
</BaseEvent>
</ArrayOfBaseEvent>
Once you have an XML file, you can query data from it. In this case, XPath and PowerShell may be your best option. If you want to load the data into a data grid and visually transform it, try Microsoft Excel.
Alternatively, you may think about writing a program in .NET for log data processing. Please take the definition of the BaseEvent, SqlEvent, and SqlQueryEvent classes from EDocsLog.dll to load data effectively.
See Also:
eDOCS DM Server Log Parser - Part 1: Understanding the Task
eDOCS DM Server Log Parser - Part 2: Implementation
You can download the compiled tool from my Google drive. Here is the link: EDocsLogParser
The tool requires .NET Framework 4.0 or later, which I believe you already have on your Windows system.
Usage:
- Launch the EDocsLogParser application.
- Click the 'Directory...' button and select a folder with one or more log files from your DM server.
- Press the 'Start' button.
- XML files will be created in the same directory where source DM logs are located and which you picked for processing.
DOCSSQL: [0ECE9D58] SQLObject at 10D48F58 acquired existing connection from pool #1
********** 13:59:28.871 [0ECE9D58] DOCSSQL: EXECute SQL Statement on Library:MYLIB - MYDB (Oracle7) **********
Autocommit is ON
STATEMENT:
SELECT DOCSADM.APPS.APPLICATION,DOCSADM.APPS.DESCRIPTION,'AMBIENT_PROPERTY' UNK1,DOCSADM.APPS.SYSTEM_ID,'' FROM DOCSADM.APPS WHERE (SYSTEM_ID != 0) AND ((DOCSADM.APPS.APPLICATION = 'MS WORD')) AND (DOCSADM.APPS.DISABLED NOT IN ('Y','T','1') OR DOCSADM.APPS.DISABLED IS NULL) ORDER BY DOCSADM.APPS.APPLICATION ASC
TIMER: [0ECE9D58] ODBCHandle::ReadItem(): 15 milliseconds Fetched first row
DOCSSQL: [0ECE9D58] ODBCHandle::IssueCommand(): Statement returned results. 32 rows per fetch. 5248 bytes allocated for result sets.
TIMER: [0ECE9D58] ODBCHandle::IssueCommand(): 22 milliseconds
DOCSSQL: [0ECE9D58] ODBCHandle::ClearResults(): 1 row(s) fetched
DOCSSQL: [0ECE9D58] SQLObject at 10D48F58 released connection back to pool
The resultant XML file:
<?xml version="1.0"?>
<ArrayOfBaseEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<BaseEvent xsi:type="SqlEvent" key="0ECE9D58" connection="1" isNew="False">
<Queries>
<SqlQueryEvent time="13:59:28.871" readItemDuration="0.015" issueCommandDuration="0.022">
<Command>SELECT DOCSADM.APPS.APPLICATION,DOCSADM.APPS.DESCRIPTION,'AMBIENT_PROPERTY' UNK1,DOCSADM.APPS.SYSTEM_ID,'' FROM DOCSADM.APPS WHERE (SYSTEM_ID != 0) AND ((DOCSADM.APPS.APPLICATION = 'MS WORD')) AND (DOCSADM.APPS.DISABLED NOT IN ('Y','T','1') OR DOCSADM.APPS.DISABLED IS NULL) ORDER BY DOCSADM.APPS.APPLICATION ASC</Command>
</SqlQueryEvent>
</Queries>
</BaseEvent>
</ArrayOfBaseEvent>
Once you have an XML file, you can query data from it. In this case, XPath and PowerShell may be your best option. If you want to load the data into a data grid and visually transform it, try Microsoft Excel.
Alternatively, you may think about writing a program in .NET for log data processing. Please take the definition of the BaseEvent, SqlEvent, and SqlQueryEvent classes from EDocsLog.dll to load data effectively.
See Also:
eDOCS DM Server Log Parser - Part 1: Understanding the Task
eDOCS DM Server Log Parser - Part 2: Implementation
No comments:
Post a Comment