Deleting all the triples in the IMM database
A common question that comes up a lot on our IMMAsk@microsoft.com alias is how does one delete all of the RDF triples in the IMM database. Just follow these simple steps.
- Open up SQL Server Management Studio and connect to your SQL Server.
- Open up the IMMMetadata Database
- Right click on the IMMMetadata and select New Query
- Enter this SQL script and execute it.
exec sw_sparql '
DELETE FROM <http://schemas.microsoft.com/IMM/data> {?s ?p ?o}
FROM <http://schemas.microsoft.com/IMM/data>
WHERE { ?s ?p ?o }'
,0
That will delete all of the triples in the “data” graph for IMM. Note that there is a known bug in RTM of 2.0 where some triples of type “decimal” could be left behind. Just ignore those triples if there are just a few of them.