troubleshooting Question

Insert Log file contents to a database

Avatar of weklica
weklica asked on
VB ScriptMicrosoft DOS
7 Comments2 Solutions485 ViewsLast Modified:
I have a large .log file.  I want to take each new line item (from last processed loop) to add to a simple database.  The database can be a field or two.... I will make it however is best to accommodate the project.  

here is a sample of the file:
05/03/11 16:49:51 U I - Ambassador- cmd=38238
05/03/11 16:49:52 U I - Ambassador- cmd=38017
05/03/11 16:49:57 U I - Ambassador- cmd=38013
05/03/11 16:49:57 S I - Ambassador- before exam display: DropRule = Memory Load(75 to 80), Tuning(+-0); ImageMem = 1055.5 MB; PhysicalMem = 1,276,993,536/3,220,701,184; Pagefile = 5,805,072,384/7,385,329,664 Virtual Avail =1,219,174,400/2,621,308,928 Memory load = 60
05/03/11 16:50:07 U I - Ambassador- cmd=38238
05/03/11 16:50:08 U I - Ambassador- cmd=38026
05/03/11 16:50:10 U I - Ambassador- cmd=41920
05/03/11 16:50:12 U I - Ambassador- cmd=38264
05/03/11 16:50:16 U I - Ambassador- cmd=38223
05/03/11 16:50:26 U I - Ambassador- cmd=38223
05/03/11 16:50:28 U I - Ambassador- cmd=41903
05/03/11 16:50:28 U I - Ambassador- cmd=38223
05/03/11 16:52:26 U I - Ambassador- cmd=38238
05/03/11 16:52:27 U I - Ambassador- cmd=38152
05/03/11 16:52:32 S I - (Begin) Save Image Edits.




==============  now, there is much more to the log file, but each new record begins with a timestamp.  So, how can I have a script loop and insert each row into a record on the database?  It would be nice if it would insert "PROCESSED" or something on its own new line  in the log file and on the next cycle, pick up from the last Procssed word.\

this would allow me to loop the script and really only process the new records.
ASKER CERTIFIED SOLUTION
franked_it

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros