This HTML5 document contains 34 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
dctermshttp://purl.org/dc/terms/
atomhttp://atomowl.org/ontologies/atomrdf#
foafhttp://xmlns.com/foaf/0.1/
n20http://vos.openlinksw.com/dataspace/services/wiki/
oplhttp://www.openlinksw.com/schema/attribution#
n14http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/VirtTransactionLogsRead/sioc.
n2http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
n9http://docs.openlinksw.com/virtuoso/fn_read_log.
dchttp://purl.org/dc/elements/1.1/
n15http://vos.openlinksw.com/dataspace/dav#
rdfshttp://www.w3.org/2000/01/rdf-schema#
n19http://rdfs.org/sioc/services#
n8http://docs.openlinksw.com/virtuoso/fn_log_text.
siocthttp://rdfs.org/sioc/types#
n7http://vos.openlinksw.com/dataspace/person/dav#
n10http://vos.openlinksw.com/dataspace/owiki/wiki/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n22http://vos.openlinksw.com/dataspace/owiki#
n12http://docs.openlinksw.com/virtuoso/fn_log_enable.
n5http://docs.openlinksw.com/virtuoso/clusteroperation.html#
xsdhhttp://www.w3.org/2001/XMLSchema#
n11http://docs.openlinksw.com/virtuoso/vsp1.html#
n21http://vos.openlinksw.com/dataspace/person/owiki#
siochttp://rdfs.org/sioc/ns#
Subject Item
n7:this
foaf:made
n2:VirtTransactionLogsRead
Subject Item
n15:this
sioc:creator_of
n2:VirtTransactionLogsRead
Subject Item
n20:item
n19:services_of
n2:VirtTransactionLogsRead
Subject Item
n22:this
sioc:creator_of
n2:VirtTransactionLogsRead
Subject Item
n10:VOS
sioc:container_of
n2:VirtTransactionLogsRead
atom:entry
n2:VirtTransactionLogsRead
atom:contains
n2:VirtTransactionLogsRead
Subject Item
n2:VirtTransactionLogsRead
rdf:type
atom:Entry sioct:Comment
dcterms:created
2017-06-13T05:45:53.673864
dcterms:modified
2017-06-13T05:45:53.673864
rdfs:label
VirtTransactionLogsRead
foaf:maker
n21:this n7:this
dc:title
VirtTransactionLogsRead
opl:isDescribedUsing
n14:rdf
sioc:has_creator
n15:this n22:this
sioc:content
%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---++Reading Virtuoso Transaction Logs ---++What? A Stored Procedure that uses the in-built [[http://docs.openlinksw.com/virtuoso/fn_read_log.html][read_log()]] function to read the Transaction log of a Virtuoso Instance, in regards to Quad Store activity. ---++Why? There are times when you application functionality benefits from being able to read Virtuoso Transaction logs. In particular, the database triggers on the <code>RDF_QUAD</code> table are not meant to be supported in Virtuoso 7+, thus reading transaction logs as indicated below is the recommended method for tracking changes to the <code>RDF_QUAD</code> table. ---++How? To read the changes made to the <code>RDF_QUAD</code> table i.e RDF data, one can use the following Virtuoso Stored procedure that uses the in-built [[http://docs.openlinksw.com/virtuoso/fn_read_log.html][read_log()]]: ---+++Sample Scenario 1 Insert sample data so to change the rdf_quad index: <verbatim> SQL> SPARQL INSERT INTO <g> { <s> <p> <o> }; </verbatim> 1 Create the following example procedure: <verbatim> create procedure rlt (in f any, in inpos int := 0) { declare h, op, g, s, p, o any; declare pos int; result_names (op, g, s, p, o); h := file_open (f, inpos); declare r, rr any; while ((rr := read_log (h, pos)) is not null) { declare rw, k any; declare i int; rw := null; k := null; for (i := 1; i < length (rr); i := i + 1) { r := rr[i]; if (r[0] = 13) -- key insert { rw := r[2]; op := 'I'; } else if (r[0] in (1,8,9)) -- insert,soft,replacing { rw := r[1]; op := 'I'; } else if (r[0] in (3,14)) -- delete { rw := r[1]; op := 'D'; } if (rw is not null) { k := rw[0]; if (k = 273) -- RDF_QUAD, should check with SYS_KEYS { result (op, __ro2sq (rw[1]), __ro2sq (rw[2]), __ro2sq (rw[3]), __ro2sq (rw[4])); } } } } result (pos + inpos, '', '', '', ''); } ; </verbatim> 1 Call the procedure: * In case of no changes to the <code><nowiki>RDF_QUAD</nowiki> Index</code> are done, it will return: <verbatim> SQL> rlt('tmp/Virtuoso.trx'); Query result: op g s p o ANY ANY ANY ANY ANY 8403 No. of rows in result: 1 </verbatim> * In case of changes to the <code><nowiki>RDF_QUAD</nowiki> Index</code> are done ( example with the short INSERT we did above), it will return for example: <verbatim> SQL> rlt('tmp/Virtuoso.trx'); Query result: op g s p o ANY ANY ANY ANY ANY I g s p o 71446 No. of rows in result: 2 </verbatim> To read the transaction log in general, one should use the Virtuoso [[http://docs.openlinksw.com/virtuoso/fn_read_log.html][read_log()]] function. ---++Related * [[http://docs.openlinksw.com/virtuoso/vsp1.html#longhttptrans][Long HTTP Transactions.]] * [[http://docs.openlinksw.com/virtuoso/clusteroperation.html#clusteroperationtransc][Cluster Operations transactions.]] * [[http://docs.openlinksw.com/virtuoso/fn_log_text.html][Insert a SQL statement into the roll forward log.]] * [[http://docs.openlinksw.com/virtuoso/fn_log_enable.html][Enable logs.]]
sioc:id
a8b72f39b5f50e3e14fa7a14f89fbf7e
sioc:link
n2:VirtTransactionLogsRead
sioc:has_container
n10:VOS
n19:has_services
n20:item
atom:title
VirtTransactionLogsRead
sioc:links_to
n5:clusteroperationtransc n8:html n9:html n11:longhttptrans n12:html
atom:source
n10:VOS
atom:author
n7:this
atom:published
2017-06-13T05:45:53Z
atom:updated
2017-06-13T05:45:53Z
sioc:topic
n10:VOS