Previous Next

Thread: SQL EVT Problems

Last post 08-18-2008 3:48 AM by plore. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 08-01-2008, 7:56 AM

    • plore
    • Not Ranked
    • Joined on 08-01-2008, 11:31 AM
    • Posts 2
    • plore

    SQL EVT Problems

    Hello,
    I am trying to extract of several servers the file "log" of the system in SQL's BD and in turn they putting a file .lpc in order that the events do not repeat themselves.
    I have been reading be afraid that they were coinciding with my problem, but I have not managed to solve mine

    I am trying it of two forms:
    1. Of this form I do not manage to jump the mistake " Error: Error connecting to registry on server ..."

    logparser -i:EVT "SELECT ComputerName,EventID,Message,TimeGenerated INTO aprueba FROM \\server1\system,\\server2\system,\\server3\system,\\server4\system" -o:SQL -server:SERVER -driver:"SQL Server" -database:LogparserBD -createtable:on -iCheckpoint:"C:\aprueba.lpc"

    2. With this file batch do not achieve that it me works icheckpoint

    Set Srv=\\server\Servers.txt
    Set Aplicacion=\\server\servidores\LogParser\Software\LogParser.exe
    for /F %%a in (%Srv%) do %aplicacion% -i:EVT "SELECT ComputerName,EventID,Message,TimeGenerated INTO systemsevt FROM \\%%a\system" -o:SQL -server:SERVER -driver:"SQL Server" -database:LogparserBD -createtable:ON -iCheckpoint:"C:\aprueba.lpc"

    Excuse my Englishman of program translator.
    Thank you for everything.
    Regards

  • 08-02-2008, 5:19 AM In reply to

    • yellowdog.dave
    • Top 75 Contributor
    • Joined on 07-18-2008, 3:17 AM
    • Johannesburg, South Africa
    • Posts 47
    • yellowdog.dave

    Re: SQL EVT Problems

    Hi There, 

    I think your problem is because you are overwriting your checkpoint file with each iteration of the for loop - you need to have one for each of your servers. Try this in your batch file; 

     for /F %%a in (%Srv%) do %aplicacion% -i:EVT "SELECT ComputerName,EventID,Message,TimeGenerated INTO systemsevt FROM \\%%a\system" -o:SQL -server:SERVER -driver:"SQL Server" -database:LogparserBD -createtable:ON -iCheckpoint:%%a.lpc

    I hope that this helps.

    Cheers, Dave 

    Yes, dear
  • 08-18-2008, 3:48 AM In reply to

    • plore
    • Not Ranked
    • Joined on 08-01-2008, 11:31 AM
    • Posts 2
    • plore

    Re: SQL EVT Problems

    Thank you very much yellowdog.dave, with this my problem has been solved!

    A greeting

Page 1 of 1 (3 items)
Page view counter