Search code examples
sparqldbpedia

Virtuoso 42000 Error SR186: How to grant permission on dbpedia with a SPARQL Query?


On de.dbpedia, I'm running the following query:

SELECT distinct *
WHERE {
{
    ?name dcterms:subject category-de:Haus_Liechtenstein.
    ?name rdf:type foaf:Person.
Optional {?name <http://de.dbpedia.org/ontology/deathDate> ?deathDate}
MINUS {?name dbpedia-owl:deathDate ?d}
}
union{
    SERVICE silent <http://dbpedia.org/sparql>{
    ?name dcterms:subject category-en:Princely_Family_of_Liechtenstein.
    ?name rdf:type foaf:Person.
Optional {?name <http://dbpedia.org/ontology/deathDate> ?deathDate}
MINUS {?name <http://dbpedia.org/ontology/deathDate> ?d}
}
}
}

Getting the following error:

Virtuoso 42000 Error SR186: No permission to execute procedure DB.DBA.SPARUL_LOAD_SERVICE_DATA with user ID 106, group ID 106

Is there a way to grant permission? How can I get my results? btw: the "Optional" is only to check if I get the correct results...

Thanks a lot in advance

Fobi


Solution

  • Your query has multiple issues. First, you need to replace both your <http://de.dbpedia.org/ontology/deathDate> with dbpedia-owl:deathDate. Second, I am assuming you are trying to get all the ?deathDates and then filter the ones that have no ?deathDate. If so, this is the query you need to write without getting into trouble with permissions:

    SELECT distinct *
    WHERE {
    {
    ?name dcterms:subject category-de:Haus_Liechtenstein.
    ?name rdf:type foaf:Person.
    Optional {?name dbpedia-owl:deathDate ?deathDate}
    }
    union{
    SERVICE silent <http://dbpedia.org/sparql>{
    ?name dcterms:subject category-en:Princely_Family_of_Liechtenstein.
    ?name rdf:type foaf:Person.
    Optional {?name dbpedia-owl:deathDate ?deathDate}
    }
    }
    filter (!bound(?deathDate))
    }