Page 1 of 1

Query log export script

Posted: Tue Feb 14, 2006 4:34 pm
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.

Query log export script

Posted: Tue Feb 14, 2006 4:58 pm
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>

Query log export script

Posted: Tue Feb 14, 2006 5:06 pm
by John
You might also want to look at the more recent scripts on the website which already have more query log reporting options as well as a function to generate CSV.

http://www.thunderstone.com/texis/site/ ... ripts.html

Query log export script

Posted: Tue Feb 14, 2006 6:26 pm
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>

Query log export script

Posted: Wed Feb 15, 2006 10:50 am
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.