junglecom
asked on
Collect information from a .txt file or email and insert into a database?
I have some log files that I would like to collect using a access database. The log files are located on a different machine than my workstation and are in xml format inside a .txt file. Below is an example of the XML.
I have no clue how to make an access db that can qurery this and make a report. Someone please help.
Thank you!!!!!!!!!!!!!!!! X 1million
I have no clue how to make an access db that can qurery this and make a report. Someone please help.
Thank you!!!!!!!!!!!!!!!! X 1million
<?xml version="1.0" encoding="UTF-8" ?>
<log uuid="6B72A05E-43CB-4505-9D1C-9216B629A9C3" product="Acronis True Image Echo Enterprise Server" version="1.0" build="174" task="6788B635-BAA8-4D13-9AC2-EC7902BB62BD" >
<event id="1" level="2" module="100" code="2" time="1227057292" message="The "Current restore operation" operation started" />
<event id="2" level="3" module="100" code="11" time="1227057292" message="Priority changed to High priority" />
<event id="3" level="4" module="100" code="5" time="1227057333" message="Operation has completed with errors." />
</log>
There are many ways to interpret your request. Please give an example of a report.
ASKER
A report that will list the type of event, time and message of the each event in the log. There could be 10 log files in a single folder.
1 Information 11/18/2008 3:14:52 PM The "Current restore operation" operation started
2 Warning! 11/18/2008 3:14:52 PM Priority changed to High priority
3 Error 11/18/2008 3:15:33 PM Operation has completed with errors.
1 Information 11/18/2008 3:14:52 PM The "Current restore operation" operation started
2 Warning! 11/18/2008 3:14:52 PM Priority changed to High priority
3 Error 11/18/2008 3:15:33 PM Operation has completed with errors.
Is there any special reason for using Access?
If all you want to do is read the file and generate the report then we could take other approaches.
If all you want to do is read the file and generate the report then we could take other approaches.
ASKER
Thank you ramrom! That is the second time that has happened to me.
No it doesnt have to be in access, but I like access cause of the nice reports.
No it doesnt have to be in access, but I like access cause of the nice reports.
Any other requirements such as a sort order or events to be ignored, or ???
Does each record have the same format? Like this pattern?
<event id="x" level="y" module="z" code="a" time="b" message="c" />
How does 1227057333 translate to a date-time?
Which field translates to Information etc and what is the coding?
How will the log files be accessed?
How many events could there be?
Does each record have the same format? Like this pattern?
<event id="x" level="y" module="z" code="a" time="b" message="c" />
How does 1227057333 translate to a date-time?
Which field translates to Information etc and what is the coding?
How will the log files be accessed?
How many events could there be?
ASKER
1. Any other requirements such as a sort order or events to be ignored, or ???
I only need to know.a. What time it startedb. what time it finishedc. size of backupd. if it failede. what error message
Does each record have the same format? Like this pattern?
<event id="x" level="y" module="z" code="a" time="b" message="c" />
Yes, i believe they all have that pattern. View attached picture of the logs
How does 1227057333 translate to a date-time?
Have no clue. But i will call acronis to find out
Which field translates to Information etc and what is the coding?
Not sure what you are asking but see the attached log picture please
How will the log files be accessed?
I am guessing through an domain admin account that can pull the logs somehow to a central machine or read the file remotely.
How many events could there be?
More than I know. I would guess 100+
I only need to know.a. What time it startedb. what time it finishedc. size of backupd. if it failede. what error message
Does each record have the same format? Like this pattern?
<event id="x" level="y" module="z" code="a" time="b" message="c" />
Yes, i believe they all have that pattern. View attached picture of the logs
How does 1227057333 translate to a date-time?
Have no clue. But i will call acronis to find out
Which field translates to Information etc and what is the coding?
Not sure what you are asking but see the attached log picture please
How will the log files be accessed?
I am guessing through an domain admin account that can pull the logs somehow to a central machine or read the file remotely.
How many events could there be?
More than I know. I would guess 100+
<?xml version="1.0" encoding="UTF-8" ?>
<log uuid="609B0D58-CBE6-45E3-8EEB-3018932349C3" product="Acronis True Image Echo Enterprise Server" version="1.0" build="174" task="1BD44053-CC3E-45C6-A3E7-08FCB58029D0" >
<event id="1" level="2" module="100" code="2" time="1229313602" message="The "backupjobName" operation started" />
<event id="2" level="2" module="1" code="503" time="1229313603" message="Analyzing partition 0-0..." />
<event id="3" level="2" module="1" code="503" time="1229313604" message="Analyzing partition C:..." />
<event id="4" level="3" module="100" code="11" time="1229313604" message="Priority changed to High priority" />
<event id="5" level="2" module="1" code="503" time="1229313604" message="Analyzing partition C:..." />
<event id="6" level="2" module="1" code="1008" time="1229313604" message="<bold>Create Full Backup Archive</bold><endl/><tabpoint value=30><indent value=4>From:	<indent value=10><textcolor value="navyblue">Disk 1</textcolor></indent><indent value=4><endl/>To file:	<indent value=10><textcolor value="navyblue">"\\pathtoserverlocation\backupname.tib"</textcolor></indent><indent value=4><endl/>Compression:	<indent value=10><textcolor value="navyblue">Normal</textcolor></indent><indent value=4><endl/></indent>" />
<event id="7" level="2" module="1" code="504" time="1229313604" message="Pending operation 135 started: "Creating partition image"" />
<event id="8" level="2" module="1" code="506" time="1229313608" message="Locking partition C:..." />
<event id="9" level="2" module="1" code="504" time="1229313960" message="Pending operation 132 started: "Saving partition structure"" />
<event id="10" level="2" module="100" code="6" time="1229313961" message="Operation has succeeded." />
</log>
ASKER
Attached is the photo and the logs of a failed tasks.
The failed tasks always have the message of "Operation has completed with errors."
The failed tasks always have the message of "Operation has completed with errors."
<?xml version="1.0" encoding="UTF-8" ?>
<log uuid="5E9B4F57-B452-49AA-82D7-A7E73FEF8D52" product="Acronis True Image Echo Enterprise Server" version="1.0" build="174" task="C3BCED94-D7CF-41A4-BE4B-091C4AA19B41" >
<event id="1" level="2" module="100" code="2" time="1229517005" message="The "backupjobName" operation started" />
<event id="2" level="2" module="1" code="503" time="1229517009" message="Analyzing partition 0-0..." />
<event id="3" level="2" module="1" code="503" time="1229517010" message="Analyzing partition C:..." />
<event id="4" level="3" module="100" code="11" time="1229517010" message="Priority changed to Low priority" />
<event id="5" level="2" module="1" code="503" time="1229517010" message="Analyzing partition C:..." />
<event id="6" level="2" module="1" code="1008" time="1229517030" message="<bold>Create Differential Backup Archive</bold><endl/><tabpoint value=30><indent value=4>From:	<indent value=10><textcolor value="navyblue">Disk 1</textcolor></indent><indent value=4><endl/>To file:	<indent value=10><textcolor value="navyblue">"\\pathtoserverlocation\backup.tib"</textcolor></indent><indent value=4><endl/>Compression:	<indent value=10><textcolor value="navyblue">Normal</textcolor></indent><indent value=4><endl/></indent>" />
<event id="7" level="2" module="1" code="504" time="1229517035" message="Pending operation 135 started: "Creating partition image"" />
<event id="8" level="2" module="1" code="506" time="1229517036" message="Locking partition C:..." />
<event id="9" level="4" module="7" code="33" time="1229517044" message=" Unable to create volume snapshot: None" />
<event id="10" level="2" module="7" code="33" time="1229564452" message=" Unable to create volume snapshot: None: User replied: oK" />
<event id="11" level="4" module="1" code="502" time="1229564452" message="Operation with partition "0-0" was terminated. Details: <indent>Unable to create volume snapshot (0x70021)    Tag = 0xA5695862AAF8E76F Failed to set snapshot bitmap. (0x10C44E)    blocks = AE9ED75)    Tag = 0x14181C22EF45AD9A Not enough storage is available to process this command (0xFFF0)    code = 80070008)    Tag = 0xBD28FDBD64EDB8AF</indent>" />
<event id="12" level="4" module="100" code="5" time="1229564453" message="Operation has completed with errors." />
</log>
logs.jpg
ASKER
Acronis would not reveal much to me, but time="1229313602" is in seconds, so they say
ASKER
Sorry,
To be more specific the epoch time format
To be more specific the epoch time format
ASKER
Forgot to mention that the log file is not a .txt but a .log file. Not sure if that makes a difference
ASKER
One way would be to use MSSQL Server Express (any version). It allows for OLEDB access to XML files, and you get all database features for free. For management, you will need the Express Studio (extra MS download).
However, access to a network drive might be a problem, as there are permission restrictions if you try to automate import (what is feasable with MSSQL).
However, access to a network drive might be a problem, as there are permission restrictions if you try to automate import (what is feasable with MSSQL).
Please have a look at this link, it does a similar task.
https://www.experts-exchange.com/questions/20983597/Importing-Text-File.html
jaffer
https://www.experts-exchange.com/questions/20983597/Importing-Text-File.html
jaffer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It seems as if what I am asking is impossible. Thanks everyone for trying!
You may want to put in a call to Acronis.
As the underdog competitor to Norton Ghost, they sould be more that willing to help you out, if you inform then that you might be thinking of switching to Norton Ghost.
;-)
Jeff
As the underdog competitor to Norton Ghost, they sould be more that willing to help you out, if you inform then that you might be thinking of switching to Norton Ghost.
;-)
Jeff