Query log export script

Post Reply
woodsb
Posts: 2
Joined: Tue Feb 14, 2006 4:20 pm

Query log export script

Post by woodsb »

We are running webinator 5.1.24 for windows and would like to have a script that would export the query logs to a csv file over a unc path to another server.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Query log export script

Post by mark »

The basics would be something like

<write append "\\path\to\file">
<sql row "select * from querylog">
<fmt "%at" "%Y-%m-%d %H:%M:%S" $id>,"$Client","$Info","$Query"
</sql>
</write>
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Query log export script

Post by John »

John Turnbull
Thunderstone Software
woodsb
Posts: 2
Joined: Tue Feb 14, 2006 4:20 pm

Query log export script

Post by woodsb »

How would this look in a bat format?

i.e.-

D:

cd D:\Thunderstone Software\Webinator\Texis\default\db1

"D:\Thunderstone Software\Webinator\texis.exe" <write append "\\servername\sharename\filename.csv">
<sql row "select * from querylog">
<fmt "%at" "%Y-%m-%d %H:%M:%S" $id>,"$Client","$Info","$Query"
</sql>
</write>
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Query log export script

Post by John »

You need to either create a new vortex script file, or add a function to the existing dowalk script. With
the current scripts a function such as:

<A NAME=dumpqlog PUBLIC>
<settings>
<WRITE $fname>
<genqlogexcel sqlact="select *">
</WRITE>
</A>

in the dowalk script, and then invoked as

texis.exe profile=Profile fname=FileName dowalk/dumpqlog.txt

should work.
John Turnbull
Thunderstone Software
Post Reply