Write querylog output to file

Post Reply
leogaggl
Posts: 12
Joined: Sun Apr 28, 2002 7:41 pm

Write querylog output to file

Post by leogaggl »

I have the following srcipt in my dowalk file and this has been working before. When I run a walk no file is getting created.

<if $SSc_walking ne ""><!-- walk in progress -->
<write append $summaryfile>
<b>Walk already running. Ignoring second walk start request.</b><br>
</write>
<exit><!-- quit -->
</if>
<strfmt "F:/webinator/querylog/querylog%at.txt" "%Y%m%d%H%M%S" now>
<write $ret>
<db=$dblive>
<sql row "SELECT CONVERT(id, 'date') id, Client, Query, Info FROM querylog">
$id $Client $Query $Info
</sql>
<db=$SS_db>
</write>

Is there a way of getting an errorlog. I can not see a reason why this is failing. The directory has full permissions for everybody.


Regards,

Leo Gaggl
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Write querylog output to file

Post by mark »

Before when? What changed between when it worked and when it didn't?
Disk isn't full is it?
<write> doesn't generate any status. You might check your vortex.log though for general problems.
leogaggl
Posts: 12
Joined: Sun Apr 28, 2002 7:41 pm

Write querylog output to file

Post by leogaggl »

It is hard to pinpoint the change. We noticed recently that the files stopped being created on all servers a few months ago.

The only changes on those machines during that time were M$ security updates. We thought the upgrade to V5.0 will fix it but the problem still exists.

As a workaround we could probably run it externaly. Have you got an example of running a commandline executable from the dowalk script. i.e. running an external program from vortex script.

Best regards,

Leo Gaggl
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Write querylog output to file

Post by mark »

f: isn't a network drive is it? Programs started by the webserver will generally not have access to networked resources. As a test try writing to c:\testlog.txt or such to see if that works.

If <write> doesn't work it's not likely that an exec'd program will be able to write that file either. But you can lookup <exec> in the vortex manual.

Oh, and, uh, make sure query logging is on for that profile and there have been some queries logged :-)
leogaggl
Posts: 12
Joined: Sun Apr 28, 2002 7:41 pm

Write querylog output to file

Post by leogaggl »

Hi Mark,

No f: is a partition on the server.

And we made sure querylogging is on and there are queries logged :)

Will give <exec> a try.
Post Reply