There are times it can be useful to remove all triples from Virtuoso Server. There are a few ways to accomplish this.
Use iSQL, either on the command-line or through the Virtuoso Conductor -> Database -> Interactive SQL, to execute this SQL query --
SQL> DELETE FROM DB.DBA.RDF_QUAD ;
autocommit
with no transaction logging on each operation, deleting the graph(s) or triples, and then setting the log mode back to its original setting.
This is easily done using the Virtuoso log_enable
function, with the settings log_enable(3,1)
.
SQL> RDF_GLOBAL_RESET ();
SQL> SPARQL SELECT DISTINCT ?g FROM <http://localhost:8894/> { GRAPH ?g { ?s a ?t } } ; g ANY http://www.openlinksw.com/schemas/virtrdf# No. of rows in result: 1
Take all non-system graphs, and for each of them execute:
SPARQL CLEAR GRAPH <The Graph URI here> ;