Ok, actually it works, but only if the query is not already in cache. Is there a way to log also cached queries ?
Alexandre. 2009/4/24 Alexandre Bertails <berta...@gmail.com> > Hi all, > > I also need to log SPARQL queries into Virtuoso. > > I have activated everything with : > > SQL> trace_status(); > > and with the trace_status_show() procedure, here is what I have : > > SQL> trace_status_show(); > opt status > VARCHAR VARCHAR > > _______________________________________________________________________________ > > user_log on > failed_log on > compile on > ddl_log on > client_sql on > errors on > dsn on > sql_send on > transact on > remote_transact on > exec on > soap on > thread on > cursor on > soap_client on > > 15 Rows. -- 2 msec. > > > I have now a lot of logs, but no queries. > > Is this normal and if not, does anybody have a solution for logging SPARQL > queries ? > > Thanks, > > Alexandre. > > > > 2009/1/7 Hugh Williams <hwilli...@openlinksw.com> > >> Hi Kjetil, >> I typically just run "trace_on()" without any options giving you >> everything and you definitely will see any sparql or other queries being >> executed. Or the following showed me the sparql query being executed: >> >> trace_on('exec','soap', 'client_sql', 'compile'); >> >> With compile being the option that enable the sparql queries to be logged >> that were being compiled: >> >> 08:57:19 COMP_2 0 10.100.2.14 Internal Compile text: call >> "WS"."WS"."/DAV/VAD/rdf_mappers/rdfdesc/description.vsp" (?, ?, ?) >> 08:57:19 COMP_2 105 10.100.2.14 Internal Compile text: sparql define >> get:soft "soft" SELECT * from < >> http://demo.openlinksw.com/schemas/oraclehr/max_salary> where { ?x ?y ?z >> } >> 08:57:20 COMP_2 105 192.168.11.149 Internal Compile text: sparql >> CONSTRUCT { <http://demo.openlinksw.com/schemas/oraclehr/max_salary> ?p >> ?o } >> FROM <http://demo.openlinksw.com/schemas/oraclehr> >> WHERE { <http://demo.openlinksw.com/schemas/oraclehr/max_salary> ?p ?o } >> >> trace_status_show() is not a Virtuoso defined procedure/function, but >> rather one you would need to create to enable the output to the >> trace_status() built in function to be human readable, as detailed at: >> >> http://docs.openlinksw.com/virtuoso/fn_trace_status.html >> >> Best Regards >> Hugh Williams >> Professional Services >> OpenLink Software >> Web: http://www.openlinksw.com >> Support: http://support.openlinksw.com >> Forums: http://boards.openlinksw.com/support >> >> >> >> On 7 Jan 2009, at 12:55, Kjetil Kjernsmo wrote: >> >> On Tuesday 06 January 2009 18:57:33 Hugh Williams wrote: >> >> Hi Kjetil, >> >> You can use the Virtuoso trace_on() function as detailed at: >> >> http://docs.openlinksw.com/virtuoso/fn_trace_on.html#(NULL<http://docs.openlinksw.com/virtuoso/fn_trace_on.html#%28NULL> >> ) >> >> Which enables detailed and controlled logging of Virtuoso server >> activity to be added to the virtuoso log file including queries being >> executed ... >> >> >> OK, good, but I can't see what I need to enable to get a dump of the >> endpoint >> queries... I've set exec, sql_send and client_sql. but this is all I see >> 12:45:32 EXEC_1 0 127.0.0.1 1111:21 s1111_21_0 Exec 1 time(s) trace_on >> ('client_sql') >> 12:46:35 CSLQ_0 0 127.0.0.1 1111:21 s1111_21_0 trace_on ('sql_send') >> 12:46:35 EXEC_1 0 127.0.0.1 1111:21 s1111_21_0 Exec 1 time(s) trace_on >> ('sql_send') >> >> Also, the documentation mentions that there is a trace_status_show(), but >> I >> get >> SQL> trace_status_show(); >> *** Error 42001: [Virtuoso Driver][Virtuoso Server]SR185: Undefined >> procedure >> DB.DBA.trace_status_show. at line 9 of Top-Level: >> >> >> And this is all I get from >> SQL> trace_status(); >> >> Done. -- 1 msec. >> >> If I run a query on the isql command line, I get an entry in the logs, but >> >> that's not what I want, I need those that ran against the endpoint. >> >> How do I do that? >> >> Kind regards >> >> Kjetil Kjernsmo >> -- >> Senior Knowledge Engineer >> Mobile: +47 986 48 234 >> Email: kjetil.kjern...@computas.com >> Web: http://www.computas.com/ >> >> | SHARE YOUR KNOWLEDGE | >> >> Computas AS PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | Fax:+47 >> 6783 >> 1001 >> >> >> >> >> ------------------------------------------------------------------------------ >> Check out the new SourceForge.net Marketplace. >> It is the best place to buy or sell services for >> just about anything Open Source. >> http://p.sf.net/sfu/Xq1LFB >> _______________________________________________ >> Virtuoso-users mailing list >> Virtuoso-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/virtuoso-users >> >> >